From 2c2259f7f9b72b43abfcbc545757f0d9bb27e6c1 Mon Sep 17 00:00:00 2001 From: Yoshify Date: Mon, 24 Jul 2023 18:51:35 +1000 Subject: [PATCH] :ambulance: Fixed endpoint imports --- src/pyconnectwise/clients/automate_client.py | 25 +- src/pyconnectwise/clients/manage_client.py | 8 +- .../endpoints/automate/ApitokenEndpoint.py | 21 +- .../automate/AvtemplatepoliciesEndpoint.py | 9 +- .../automate/AvtemplatepolicydataEndpoint.py | 13 +- .../endpoints/automate/ClientsEndpoint.py | 20 +- .../automate/ClientsIdDocumentsEndpoint.py | 12 +- .../endpoints/automate/ClientsIdEndpoint.py | 44 +- .../automate/ClientsIdLicensesEndpoint.py | 18 +- .../automate/ClientsIdPermissionsEndpoint.py | 4 +- .../ClientsIdPermissionsIdEndpoint.py | 9 +- .../automate/ClientsIdProductkeysEndpoint.py | 20 +- .../endpoints/automate/CommandsEndpoint.py | 12 +- .../endpoints/automate/CommandsIdEndpoint.py | 12 +- .../automate/ComputermenusEndpoint.py | 16 +- .../automate/ComputersChassisEndpoint.py | 9 +- .../automate/ComputersDrivesEndpoint.py | 8 +- .../endpoints/automate/ComputersEndpoint.py | 48 +- .../ComputersIdAlertsuspensionsEndpoint.py | 22 +- .../automate/ComputersIdBiosEndpoint.py | 8 +- .../ComputersIdCommandexecuteEndpoint.py | 18 +- .../ComputersIdCommandhistoryEndpoint.py | 13 +- ...utersIdComputerpatchingpoliciesEndpoint.py | 13 +- .../automate/ComputersIdDevicesEndpoint.py | 9 +- .../automate/ComputersIdDriversEndpoint.py | 13 +- .../automate/ComputersIdDrivesEndpoint.py | 4 +- .../automate/ComputersIdDrivesIdEndpoint.py | 4 +- .../ComputersIdDrivesIdSmartdataEndpoint.py | 12 +- ...putersIdEffectivepatchingpolicyEndpoint.py | 11 +- .../endpoints/automate/ComputersIdEndpoint.py | 227 +++++--- ...putersIdMonitoralertsuspensionsEndpoint.py | 17 +- .../ComputersIdOperatingsystemEndpoint.py | 9 +- .../ComputersIdPatchingstatsEndpoint.py | 13 +- .../automate/ComputersIdPrintersEndpoint.py | 9 +- .../automate/ComputersIdProcessorsEndpoint.py | 9 +- .../ComputersIdRunningscriptsEndpoint.py | 9 +- .../ComputersIdScheduledscriptsEndpoint.py | 22 +- .../ComputersIdScheduledscriptsIdEndpoint.py | 9 +- .../ComputersIdScheduledtasksEndpoint.py | 9 +- .../ComputersIdScripthistoryEndpoint.py | 9 +- .../automate/ComputersIdSensorsEndpoint.py | 9 +- .../automate/ComputersIdServicesEndpoint.py | 9 +- .../automate/ComputersIdSoftwareEndpoint.py | 13 +- .../automate/ComputersIdSoftwareIdEndpoint.py | 5 +- .../ComputersIdSoftwareIdUninstallEndpoint.py | 9 +- .../ComputersIdSystemslotsEndpoint.py | 9 +- .../automate/ComputersIdUpsEndpoint.py | 12 +- .../automate/ComputersIdVideocardsEndpoint.py | 9 +- .../ComputersMaintenancemodesEndpoint.py | 9 +- .../automate/ComputersMemoryslotsEndpoint.py | 9 +- .../automate/ComputersSoftwareEndpoint.py | 9 +- .../endpoints/automate/ContactsEndpoint.py | 20 +- .../endpoints/automate/ContactsIdEndpoint.py | 29 +- .../automate/DataviewfoldersEndpoint.py | 13 +- .../automate/DataviewfoldersIdEndpoint.py | 9 +- .../endpoints/automate/DataviewsEndpoint.py | 12 +- .../endpoints/automate/DataviewsIdEndpoint.py | 12 +- .../DrivesIdDrivestatsDailyEndpoint.py | 16 +- .../automate/DrivesIdDrivestatsEndpoint.py | 32 +- .../DrivesIdDrivestatsMonthlyEndpoint.py | 16 +- .../DrivesIdDrivestatsWeeklyEndpoint.py | 16 +- .../DrivesIdDrivestatsYearlyEndpoint.py | 16 +- .../endpoints/automate/DrivesIdEndpoint.py | 8 +- .../endpoints/automate/EventlogsEndpoint.py | 12 +- ...xternalsystemcredentialsClientsEndpoint.py | 9 +- ...ernalsystemcredentialsClientsIdEndpoint.py | 7 +- .../ExternalsystemcredentialsEndpoint.py | 9 +- .../automate/FeatureflagsEndpoint.py | 8 +- .../automate/GrouppatchingpoliciesEndpoint.py | 17 +- .../endpoints/automate/GroupsEndpoint.py | 20 +- .../endpoints/automate/GroupsIdEndpoint.py | 12 +- .../InternalmonitorresultsEndpoint.py | 4 +- .../automate/LicensedproductsEndpoint.py | 9 +- .../endpoints/automate/LinksEndpoint.py | 12 +- .../endpoints/automate/LocationsEndpoint.py | 20 +- .../endpoints/automate/LocationsIdEndpoint.py | 12 +- .../LocationsIdProbeconfigurationEndpoint.py | 40 +- .../LocationsIdUpgradeprobeEndpoint.py | 9 +- .../endpoints/automate/LookupsEndpoint.py | 31 +- .../LookupsProbeeventlevelsEndpoint.py | 13 +- .../LookupsScanfrequenciesEndpoint.py | 12 +- .../LookupsSnmpencryptionmethodsEndpoint.py | 17 +- .../LookupsSnmphashmethodsEndpoint.py | 16 +- ...upsStatusscannetworkportoptionsEndpoint.py | 16 +- .../MaintenancewindowdefinitionsEndpoint.py | 15 +- .../MicrosoftupdatepoliciesEndpoint.py | 4 +- .../MonitorsIdCollecteddataEndpoint.py | 26 +- ...onitorsIdDatacollectionsettingsEndpoint.py | 15 +- .../endpoints/automate/MonitorsIdEndpoint.py | 15 +- .../automate/NetworkdevicesEndpoint.py | 21 +- .../automate/NetworkdevicesIdEndpoint.py | 17 +- .../PatchactionsDeployallapprovedEndpoint.py | 9 +- .../PatchactionsDeployallsecurityEndpoint.py | 9 +- .../automate/PatchactionsEndpoint.py | 41 +- .../PatchactionsReattemptfailedEndpoint.py | 9 +- .../PatchactionsSettopilotstageEndpoint.py | 9 +- ...atchactionsSettoproductionstageEndpoint.py | 13 +- .../PatchactionsSettoteststageEndpoint.py | 9 +- .../automate/PatchinformationEndpoint.py | 9 +- .../automate/PermissionsClientsEndpoint.py | 4 +- .../endpoints/automate/PermissionsEndpoint.py | 16 +- .../ProbeconfigurationEnableprobeEndpoint.py | 9 +- ...ProbeconfigurationEnableprobeIdEndpoint.py | 13 +- .../automate/ProbeconfigurationEndpoint.py | 8 +- ...igurationIdAgentpushcredentialsEndpoint.py | 32 +- .../automate/ProbeconfigurationIdEndpoint.py | 14 +- ...onfigurationIdSnmpconfigurationEndpoint.py | 22 +- .../endpoints/automate/ProbeeventsEndpoint.py | 16 +- .../automate/RemoteagentschedulesEndpoint.py | 22 +- .../automate/RemoteagenttemplatesEndpoint.py | 22 +- .../automate/RetiredassetsEndpoint.py | 8 +- .../endpoints/automate/RoutersEndpoint.py | 12 +- .../automate/ScriptfoldersEndpoint.py | 28 +- .../ScriptfoldersHierarchyEndpoint.py | 8 +- .../automate/ScriptfoldersIdEndpoint.py | 26 +- .../endpoints/automate/ScriptingEndpoint.py | 14 +- .../ScriptingRunningscriptsEndpoint.py | 12 +- .../ScriptingScriptschedulesEndpoint.py | 17 +- .../ScriptingScriptschedulesIdEndpoint.py | 22 +- .../endpoints/automate/ScriptsEndpoint.py | 16 +- .../endpoints/automate/ScriptsIdEndpoint.py | 29 +- .../automate/ScriptsScriptfoldersEndpoint.py | 17 +- .../ScriptsScriptfoldersIdEndpoint.py | 13 +- .../endpoints/automate/SearchesEndpoint.py | 12 +- .../automate/SearchfoldersEndpoint.py | 16 +- .../automate/SensorchecksEndpoint.py | 12 +- .../automate/ServicesIdClassifyEndpoint.py | 9 +- .../endpoints/automate/ServicesIdEndpoint.py | 8 +- .../automate/StatisticsDrivesEndpoint.py | 13 +- .../endpoints/automate/StatisticsEndpoint.py | 8 +- .../endpoints/automate/SystemEndpoint.py | 4 +- .../SystemServerinformationEndpoint.py | 13 +- .../automate/SystemcontactsEndpoint.py | 12 +- .../TemplateavailablepropertiesEndpoint.py | 18 +- .../automate/TemplatepropertiesEndpoint.py | 18 +- .../ThirdpartyupdatepoliciesEndpoint.py | 4 +- .../endpoints/automate/UserauditsEndpoint.py | 20 +- .../endpoints/automate/UserclassesEndpoint.py | 12 +- .../automate/UserclassesIdEndpoint.py | 16 +- .../UserclassesIdWebextensionsEndpoint.py | 19 +- .../automate/UserprofilesEndpoint.py | 12 +- .../endpoints/automate/UsersEndpoint.py | 12 +- .../automate/UsersFoldersEndpoint.py | 12 +- .../automate/UsersFoldersIdEndpoint.py | 29 +- .../automate/UsersIdAuthlinkEndpoint.py | 13 +- .../automate/UsersIdChangepasswordEndpoint.py | 9 +- .../endpoints/automate/UsersIdEndpoint.py | 65 ++- .../automate/UsersIdFavoritesEndpoint.py | 8 +- .../automate/UsersIdSettingsEndpoint.py | 8 +- .../automate/UsersIdUseraccessEndpoint.py | 8 +- .../automate/VirusscannerdefsEndpoint.py | 18 +- .../CompanyAddressFormatsCountEndpoint.py | 12 +- .../manage/CompanyAddressFormatsEndpoint.py | 37 +- .../manage/CompanyAddressFormatsIdEndpoint.py | 42 +- .../CompanyAddressFormatsIdInfoEndpoint.py | 9 +- .../CompanyAddressFormatsInfoCountEndpoint.py | 12 +- .../CompanyAddressFormatsInfoEndpoint.py | 17 +- .../CompanyBillingSetupsInfoCountEndpoint.py | 12 +- .../manage/CompanyBillingsetupsEndpoint.py | 8 +- .../CompanyBillingsetupsInfoEndpoint.py | 8 +- .../CompanyCommunicationTypesCountEndpoint.py | 12 +- .../CompanyCommunicationTypesEndpoint.py | 38 +- .../CompanyCommunicationTypesIdEndpoint.py | 50 +- ...CompanyCommunicationTypesIdInfoEndpoint.py | 9 +- ...mpanyCommunicationTypesIdUsagesEndpoint.py | 17 +- ...yCommunicationTypesIdUsagesListEndpoint.py | 12 +- ...panyCommunicationTypesInfoCountEndpoint.py | 12 +- .../CompanyCommunicationTypesInfoEndpoint.py | 14 +- .../manage/CompanyCompaniesCountEndpoint.py | 12 +- .../manage/CompanyCompaniesDefaultEndpoint.py | 12 +- .../manage/CompanyCompaniesEndpoint.py | 64 ++- ...mpaniesIdCustomStatusNotesCountEndpoint.py | 12 +- ...anyCompaniesIdCustomStatusNotesEndpoint.py | 36 +- ...yCompaniesIdCustomStatusNotesIdEndpoint.py | 36 +- .../manage/CompanyCompaniesIdEndpoint.py | 148 +++-- .../CompanyCompaniesIdGroupsCountEndpoint.py | 12 +- .../CompanyCompaniesIdGroupsEndpoint.py | 28 +- .../CompanyCompaniesIdGroupsIdEndpoint.py | 34 +- ...agementReportNotificationsCountEndpoint.py | 12 +- ...IdManagementReportNotificationsEndpoint.py | 36 +- ...ManagementReportNotificationsIdEndpoint.py | 30 +- ...ompaniesIdManagementReportSetupEndpoint.py | 31 +- ...paniesIdManagementReportSetupIdEndpoint.py | 18 +- ...IdManagementSummaryReportsCountEndpoint.py | 12 +- ...aniesIdManagementSummaryReportsEndpoint.py | 40 +- ...iesIdManagementSummaryReportsIdEndpoint.py | 34 +- .../manage/CompanyCompaniesIdMergeEndpoint.py | 9 +- .../CompanyCompaniesIdNotesCountEndpoint.py | 12 +- .../manage/CompanyCompaniesIdNotesEndpoint.py | 32 +- .../CompanyCompaniesIdNotesIdEndpoint.py | 37 +- .../CompanyCompaniesIdSitesCountEndpoint.py | 12 +- .../manage/CompanyCompaniesIdSitesEndpoint.py | 32 +- .../CompanyCompaniesIdSitesIdEndpoint.py | 42 +- ...CompanyCompaniesIdSitesIdUsagesEndpoint.py | 17 +- ...anyCompaniesIdSitesIdUsagesListEndpoint.py | 12 +- .../CompanyCompaniesIdSurveysCountEndpoint.py | 12 +- .../CompanyCompaniesIdSurveysEndpoint.py | 8 +- .../CompanyCompaniesIdTeamsCountEndpoint.py | 12 +- .../manage/CompanyCompaniesIdTeamsEndpoint.py | 32 +- .../CompanyCompaniesIdTeamsIdEndpoint.py | 37 +- .../CompanyCompaniesIdTracksCountEndpoint.py | 12 +- .../CompanyCompaniesIdTracksEndpoint.py | 28 +- .../CompanyCompaniesIdTracksIdEndpoint.py | 17 +- ...ompaniesIdTypeAssociationsCountEndpoint.py | 12 +- ...panyCompaniesIdTypeAssociationsEndpoint.py | 32 +- ...nyCompaniesIdTypeAssociationsIdEndpoint.py | 30 +- .../CompanyCompaniesIdUsagesEndpoint.py | 20 +- .../CompanyCompaniesIdUsagesListEndpoint.py | 12 +- .../manage/CompanyCompaniesInfoEndpoint.py | 8 +- .../CompanyCompaniesInfoTypesCountEndpoint.py | 12 +- .../CompanyCompaniesInfoTypesEndpoint.py | 21 +- .../CompanyCompaniesInfoTypesIdEndpoint.py | 9 +- .../CompanyCompaniesStatusesCountEndpoint.py | 12 +- .../CompanyCompaniesStatusesEndpoint.py | 29 +- .../CompanyCompaniesStatusesIdEndpoint.py | 39 +- ...ompanyCompaniesStatusesIdUsagesEndpoint.py | 17 +- ...nyCompaniesStatusesIdUsagesListEndpoint.py | 12 +- .../CompanyCompaniesTypesCountEndpoint.py | 12 +- .../manage/CompanyCompaniesTypesEndpoint.py | 32 +- .../manage/CompanyCompaniesTypesIdEndpoint.py | 45 +- .../CompanyCompaniesTypesIdUsagesEndpoint.py | 17 +- ...mpanyCompaniesTypesIdUsagesListEndpoint.py | 12 +- .../manage/CompanyCompanyFinanceIdEndpoint.py | 9 +- .../CompanyCompanyPickerItemsClearEndpoint.py | 9 +- .../CompanyCompanyPickerItemsCountEndpoint.py | 12 +- .../CompanyCompanyPickerItemsEndpoint.py | 38 +- .../CompanyCompanyPickerItemsIdEndpoint.py | 18 +- ...anyCompanyTypeAssociationsCountEndpoint.py | 12 +- .../CompanyCompanyTypeAssociationsEndpoint.py | 38 +- ...ompanyCompanyTypeAssociationsIdEndpoint.py | 37 +- .../manage/CompanyCompanyfinanceEndpoint.py | 4 +- .../CompanyConfigurationsBulkEndpoint.py | 24 +- .../CompanyConfigurationsCountEndpoint.py | 12 +- .../manage/CompanyConfigurationsEndpoint.py | 52 +- ...mpanyConfigurationsIdChangeTypeEndpoint.py | 8 +- .../manage/CompanyConfigurationsIdEndpoint.py | 42 +- ...panyConfigurationsStatusesCountEndpoint.py | 12 +- .../CompanyConfigurationsStatusesEndpoint.py | 43 +- ...CompanyConfigurationsStatusesIdEndpoint.py | 52 +- ...anyConfigurationsStatusesIdInfoEndpoint.py | 9 +- ...yConfigurationsStatusesIdUsagesEndpoint.py | 21 +- ...figurationsStatusesIdUsagesListEndpoint.py | 12 +- ...ConfigurationsStatusesInfoCountEndpoint.py | 12 +- ...mpanyConfigurationsStatusesInfoEndpoint.py | 14 +- .../CompanyConfigurationsTypesCopyEndpoint.py | 9 +- ...CompanyConfigurationsTypesCountEndpoint.py | 12 +- .../CompanyConfigurationsTypesEndpoint.py | 35 +- .../CompanyConfigurationsTypesIdEndpoint.py | 57 +- ...ompanyConfigurationsTypesIdInfoEndpoint.py | 9 +- ...igurationsTypesIdQuestionsCountEndpoint.py | 12 +- ...yConfigurationsTypesIdQuestionsEndpoint.py | 32 +- ...onfigurationsTypesIdQuestionsIdEndpoint.py | 43 +- ...nsTypesIdQuestionsIdValuesCountEndpoint.py | 12 +- ...rationsTypesIdQuestionsIdValuesEndpoint.py | 32 +- ...tionsTypesIdQuestionsIdValuesIdEndpoint.py | 39 +- ...ypesIdQuestionsIdValuesIdUsagesEndpoint.py | 25 +- ...IdQuestionsIdValuesIdUsagesListEndpoint.py | 16 +- ...panyConfigurationsTypesIdUsagesEndpoint.py | 17 +- ...ConfigurationsTypesIdUsagesListEndpoint.py | 12 +- .../manage/CompanyContactEndpoint.py | 8 +- ...anyContactTypeAssociationsCountEndpoint.py | 12 +- .../CompanyContactTypeAssociationsEndpoint.py | 38 +- ...ompanyContactTypeAssociationsIdEndpoint.py | 37 +- .../manage/CompanyContactTypesEndpoint.py | 4 +- .../manage/CompanyContactTypesIdEndpoint.py | 8 +- .../CompanyContactTypesIdUsagesEndpoint.py | 9 +- ...CompanyContactTypesIdUsagesListEndpoint.py | 12 +- .../manage/CompanyContactsCountEndpoint.py | 12 +- .../manage/CompanyContactsDefaultEndpoint.py | 12 +- ...CompanyContactsDepartmentsCountEndpoint.py | 12 +- .../CompanyContactsDepartmentsEndpoint.py | 35 +- .../CompanyContactsDepartmentsIdEndpoint.py | 52 +- ...ompanyContactsDepartmentsIdInfoEndpoint.py | 9 +- ...panyContactsDepartmentsIdUsagesEndpoint.py | 17 +- ...ContactsDepartmentsIdUsagesListEndpoint.py | 12 +- ...anyContactsDepartmentsInfoCountEndpoint.py | 12 +- .../CompanyContactsDepartmentsInfoEndpoint.py | 14 +- .../manage/CompanyContactsEndpoint.py | 75 ++- ...nyContactsIdCommunicationsCountEndpoint.py | 12 +- ...CompanyContactsIdCommunicationsEndpoint.py | 32 +- ...mpanyContactsIdCommunicationsIdEndpoint.py | 36 +- .../manage/CompanyContactsIdEndpoint.py | 96 +++- .../CompanyContactsIdGroupsCountEndpoint.py | 12 +- .../manage/CompanyContactsIdGroupsEndpoint.py | 28 +- .../CompanyContactsIdGroupsIdEndpoint.py | 34 +- .../manage/CompanyContactsIdImageEndpoint.py | 9 +- .../CompanyContactsIdNotesCountEndpoint.py | 12 +- .../manage/CompanyContactsIdNotesEndpoint.py | 32 +- .../CompanyContactsIdNotesIdEndpoint.py | 37 +- ...CompanyContactsIdPortalSecurityEndpoint.py | 9 +- .../CompanyContactsIdTracksCountEndpoint.py | 12 +- .../manage/CompanyContactsIdTracksEndpoint.py | 28 +- .../CompanyContactsIdTracksIdEndpoint.py | 17 +- ...ContactsIdTypeAssociationsCountEndpoint.py | 12 +- ...mpanyContactsIdTypeAssociationsEndpoint.py | 28 +- ...anyContactsIdTypeAssociationsIdEndpoint.py | 30 +- .../manage/CompanyContactsIdUsagesEndpoint.py | 20 +- .../CompanyContactsIdUsagesListEndpoint.py | 12 +- ...mpanyContactsRelationshipsCountEndpoint.py | 12 +- .../CompanyContactsRelationshipsEndpoint.py | 31 +- .../CompanyContactsRelationshipsIdEndpoint.py | 36 +- .../CompanyContactsRequestPasswordEndpoint.py | 9 +- .../CompanyContactsTypesCountEndpoint.py | 20 +- .../CompanyContactsTypesCountInfoEndpoint.py | 12 +- .../manage/CompanyContactsTypesEndpoint.py | 40 +- .../manage/CompanyContactsTypesIdEndpoint.py | 45 +- .../CompanyContactsTypesIdInfoEndpoint.py | 9 +- .../CompanyContactsTypesInfoEndpoint.py | 9 +- ...ntactsValidatePortalCredentialsEndpoint.py | 13 +- .../CompanyContactsyncCompanyCountEndpoint.py | 12 +- .../CompanyContactsyncCompanyEndpoint.py | 30 +- .../CompanyContactsyncCompanyIdEndpoint.py | 9 +- .../CompanyContactsyncCompanysyncEndpoint.py | 9 +- ...CompanyContactsyncCompanysyncIdEndpoint.py | 9 +- .../manage/CompanyContactsyncEndpoint.py | 12 +- .../manage/CompanyCountriesCountEndpoint.py | 12 +- .../manage/CompanyCountriesEndpoint.py | 40 +- .../manage/CompanyCountriesIdEndpoint.py | 45 +- .../manage/CompanyCountriesIdInfoEndpoint.py | 12 +- .../CompanyCountriesInfoCountEndpoint.py | 12 +- .../manage/CompanyCountriesInfoEndpoint.py | 20 +- .../endpoints/manage/CompanyEndpoint.py | 209 ++++--- .../manage/CompanyEntityTypesCountEndpoint.py | 12 +- .../manage/CompanyEntityTypesEndpoint.py | 32 +- .../manage/CompanyEntityTypesIdEndpoint.py | 20 +- .../CompanyEntityTypesInfoCountEndpoint.py | 12 +- .../CompanyEntitytypesIdInfoEndpoint.py | 9 +- .../manage/CompanyEntitytypesInfoEndpoint.py | 17 +- .../CompanyExpenseTypesInfoCountEndpoint.py | 12 +- .../manage/CompanyExpensetypesEndpoint.py | 8 +- .../manage/CompanyExpensetypesInfoEndpoint.py | 8 +- .../manage/CompanyM365contactCountEndpoint.py | 12 +- .../manage/CompanyM365contactEndpoint.py | 24 +- .../manage/CompanyM365contactIdEndpoint.py | 12 +- .../manage/CompanyM365contactsyncEndpoint.py | 8 +- .../CompanyM365contactsyncIdEndpoint.py | 5 +- ...ompanyM365contactsyncIdPropertyEndpoint.py | 9 +- ...anyM365contactsyncPropertyCountEndpoint.py | 12 +- .../CompanyM365contactsyncPropertyEndpoint.py | 30 +- ...M365contactsyncPropertyExcludedEndpoint.py | 9 +- ...M365contactsyncPropertyIncludedEndpoint.py | 9 +- ...ManagedDevicesIntegrationsCountEndpoint.py | 12 +- ...mpanyManagedDevicesIntegrationsEndpoint.py | 43 +- ...egrationsIdCrossReferencesCountEndpoint.py | 16 +- ...esIntegrationsIdCrossReferencesEndpoint.py | 28 +- ...IntegrationsIdCrossReferencesIdEndpoint.py | 12 +- ...anyManagedDevicesIntegrationsIdEndpoint.py | 83 ++- ...anagedDevicesIntegrationsIdInfoEndpoint.py | 7 +- ...evicesIntegrationsIdLoginsCountEndpoint.py | 12 +- ...agedDevicesIntegrationsIdLoginsEndpoint.py | 32 +- ...edDevicesIntegrationsIdLoginsIdEndpoint.py | 28 +- ...ntegrationsIdNotificationsCountEndpoint.py | 16 +- ...icesIntegrationsIdNotificationsEndpoint.py | 24 +- ...esIntegrationsIdNotificationsIdEndpoint.py | 12 +- ...agedDevicesIntegrationsIdUsagesEndpoint.py | 21 +- ...DevicesIntegrationsIdUsagesListEndpoint.py | 12 +- ...gedDevicesIntegrationsInfoCountEndpoint.py | 12 +- ...yManagedDevicesIntegrationsInfoEndpoint.py | 16 +- .../CompanyManagementBackupsCountEndpoint.py | 12 +- .../CompanyManagementBackupsEndpoint.py | 30 +- .../CompanyManagementBackupsIdEndpoint.py | 36 +- .../manage/CompanyManagementCountEndpoint.py | 12 +- .../manage/CompanyManagementEndpoint.py | 24 +- .../manage/CompanyManagementIdEndpoint.py | 62 ++- ...anagementIdExecuteManagedItSyncEndpoint.py | 13 +- .../CompanyManagementIdLogDownloadEndpoint.py | 9 +- .../manage/CompanyManagementIdLogEndpoint.py | 4 +- .../manage/CompanyManagementIdLogsEndpoint.py | 7 +- ...agementReportNotificationsCountEndpoint.py | 16 +- ...IdManagementReportNotificationsEndpoint.py | 36 +- ...ManagementReportNotificationsIdEndpoint.py | 30 +- ...mpanyManagementItSolutionsCountEndpoint.py | 12 +- .../CompanyManagementItSolutionsEndpoint.py | 35 +- .../CompanyManagementItSolutionsIdEndpoint.py | 50 +- ...utionsIdManagementProductsCountEndpoint.py | 16 +- ...ItSolutionsIdManagementProductsEndpoint.py | 18 +- ...nyManagementItSolutionsIdUsagesEndpoint.py | 21 +- ...nagementItSolutionsIdUsagesListEndpoint.py | 12 +- .../CompanyMarketDescriptionsCountEndpoint.py | 12 +- .../CompanyMarketDescriptionsEndpoint.py | 38 +- .../CompanyMarketDescriptionsIdEndpoint.py | 50 +- ...CompanyMarketDescriptionsIdInfoEndpoint.py | 9 +- ...mpanyMarketDescriptionsIdUsagesEndpoint.py | 17 +- ...yMarketDescriptionsIdUsagesListEndpoint.py | 12 +- ...panyMarketDescriptionsInfoCountEndpoint.py | 12 +- .../CompanyMarketDescriptionsInfoEndpoint.py | 14 +- .../manage/CompanyNoteTypesCountEndpoint.py | 20 +- .../CompanyNoteTypesCountInfoEndpoint.py | 12 +- .../manage/CompanyNoteTypesEndpoint.py | 38 +- .../manage/CompanyNoteTypesIdEndpoint.py | 44 +- .../manage/CompanyNoteTypesIdInfoEndpoint.py | 9 +- .../manage/CompanyNoteTypesInfoEndpoint.py | 9 +- .../CompanyOwnershipTypesCountEndpoint.py | 12 +- .../manage/CompanyOwnershipTypesEndpoint.py | 37 +- .../manage/CompanyOwnershipTypesIdEndpoint.py | 42 +- .../CompanyOwnershipTypesIdInfoEndpoint.py | 9 +- .../CompanyOwnershipTypesInfoCountEndpoint.py | 12 +- .../CompanyOwnershipTypesInfoEndpoint.py | 17 +- .../CompanyPaymentTypesInfoCountEndpoint.py | 12 +- .../manage/CompanyPaymenttypesEndpoint.py | 8 +- .../manage/CompanyPaymenttypesInfoEndpoint.py | 8 +- ...CompanyPortalConfigurationsCopyEndpoint.py | 9 +- ...ompanyPortalConfigurationsCountEndpoint.py | 12 +- .../CompanyPortalConfigurationsEndpoint.py | 49 +- .../CompanyPortalConfigurationsIdEndpoint.py | 89 ++- ...figurationsIdInvoiceSetupsCountEndpoint.py | 12 +- ...alConfigurationsIdInvoiceSetupsEndpoint.py | 21 +- ...ConfigurationsIdInvoiceSetupsIdEndpoint.py | 30 +- ...dInvoiceSetupsIdTestTransactionEndpoint.py | 13 +- ...nfigurationsIdOpportunitySetupsEndpoint.py | 22 +- ...igurationsIdOpportunitySetupsIdEndpoint.py | 17 +- ...igurationsIdPasswordEmailSetupsEndpoint.py | 12 +- ...urationsIdPasswordEmailSetupsIdEndpoint.py | 9 +- ...figurationsIdProjectSetupsCountEndpoint.py | 12 +- ...alConfigurationsIdProjectSetupsEndpoint.py | 21 +- ...ConfigurationsIdProjectSetupsIdEndpoint.py | 21 +- ...figurationsIdServiceSetupsCountEndpoint.py | 12 +- ...alConfigurationsIdServiceSetupsEndpoint.py | 21 +- ...ConfigurationsIdServiceSetupsIdEndpoint.py | 21 +- ...oiceSetupPaymentProcessorsCountEndpoint.py | 16 +- ...nsInvoiceSetupPaymentProcessorsEndpoint.py | 29 +- ...InvoiceSetupPaymentProcessorsIdEndpoint.py | 11 +- ...ompanyPortalSecurityLevelsCountEndpoint.py | 12 +- .../CompanyPortalSecurityLevelsEndpoint.py | 22 +- .../CompanyPortalSecurityLevelsIdEndpoint.py | 27 +- ...panyPortalSecuritySettingsCountEndpoint.py | 12 +- .../CompanyPortalSecuritySettingsEndpoint.py | 27 +- ...CompanyPortalSecuritySettingsIdEndpoint.py | 27 +- ...ortalconfigurationsInvoicesetupEndpoint.py | 9 +- .../manage/CompanyStatesCountEndpoint.py | 12 +- .../endpoints/manage/CompanyStatesEndpoint.py | 40 +- .../manage/CompanyStatesIdEndpoint.py | 53 +- .../manage/CompanyStatesIdInfoEndpoint.py | 12 +- .../manage/CompanyStatesIdUsagesEndpoint.py | 20 +- .../CompanyStatesIdUsagesListEndpoint.py | 12 +- .../manage/CompanyStatesInfoCountEndpoint.py | 12 +- .../manage/CompanyStatesInfoEndpoint.py | 20 +- .../manage/CompanyTeamRolesCountEndpoint.py | 12 +- .../manage/CompanyTeamRolesEndpoint.py | 40 +- .../manage/CompanyTeamRolesIdEndpoint.py | 53 +- .../manage/CompanyTeamRolesIdInfoEndpoint.py | 8 +- .../CompanyTeamRolesIdUsagesEndpoint.py | 20 +- .../CompanyTeamRolesIdUsagesListEndpoint.py | 12 +- .../CompanyTeamRolesInfoCountEndpoint.py | 12 +- .../manage/CompanyTeamRolesInfoEndpoint.py | 16 +- .../manage/CompanyTracksCountEndpoint.py | 12 +- .../endpoints/manage/CompanyTracksEndpoint.py | 32 +- .../CompanyTracksIdActionsCountEndpoint.py | 12 +- .../manage/CompanyTracksIdActionsEndpoint.py | 32 +- .../CompanyTracksIdActionsIdEndpoint.py | 37 +- .../manage/CompanyTracksIdEndpoint.py | 45 +- .../manage/ConfigurationsEndpoint.py | 8 +- .../manage/ConfigurationsTypesEndpoint.py | 12 +- .../manage/ConfigurationsTypesIdEndpoint.py | 4 +- .../ConfigurationsTypesIdQuestionsEndpoint.py | 14 +- ...onfigurationsTypesIdQuestionsIdEndpoint.py | 16 +- ...gurationsTypesIdQuestionsIdInfoEndpoint.py | 7 +- ...rationsTypesIdQuestionsIdValuesEndpoint.py | 18 +- ...tionsTypesIdQuestionsIdValuesIdEndpoint.py | 9 +- ...sTypesIdQuestionsIdValuesIdInfoEndpoint.py | 7 +- ...pesIdQuestionsIdValuesInfoCountEndpoint.py | 12 +- ...onsTypesIdQuestionsIdValuesInfoEndpoint.py | 12 +- ...ationsTypesIdQuestionsInfoCountEndpoint.py | 12 +- ...figurationsTypesIdQuestionsInfoEndpoint.py | 16 +- .../ConfigurationsTypesInfoCountEndpoint.py | 12 +- .../manage/ConfigurationsTypesInfoEndpoint.py | 17 +- .../ExpenseClassificationsCountEndpoint.py | 12 +- .../manage/ExpenseClassificationsEndpoint.py | 21 +- .../ExpenseClassificationsIdEndpoint.py | 9 +- .../endpoints/manage/ExpenseEndpoint.py | 28 +- .../manage/ExpenseEntriesCountEndpoint.py | 12 +- .../manage/ExpenseEntriesEndpoint.py | 28 +- .../ExpenseEntriesIdAuditsCountEndpoint.py | 12 +- .../manage/ExpenseEntriesIdAuditsEndpoint.py | 21 +- .../ExpenseEntriesIdAuditsIdEndpoint.py | 9 +- .../manage/ExpenseEntriesIdEndpoint.py | 42 +- .../endpoints/manage/ExpenseInfoEndpoint.py | 8 +- .../ExpenseInfoTaxTypesCountEndpoint.py | 12 +- .../manage/ExpenseInfoTaxTypesEndpoint.py | 21 +- .../manage/ExpenseInfoTaxTypesIdEndpoint.py | 9 +- .../ExpensePaymentTypesCountEndpoint.py | 12 +- .../manage/ExpensePaymentTypesEndpoint.py | 40 +- .../manage/ExpensePaymentTypesIdEndpoint.py | 45 +- .../ExpensePaymentTypesIdInfoEndpoint.py | 9 +- .../manage/ExpensePaymentTypesInfoEndpoint.py | 9 +- .../manage/ExpenseReportsCountEndpoint.py | 12 +- .../manage/ExpenseReportsEndpoint.py | 20 +- .../manage/ExpenseReportsIdApproveEndpoint.py | 9 +- .../ExpenseReportsIdAuditsCountEndpoint.py | 12 +- .../manage/ExpenseReportsIdAuditsEndpoint.py | 21 +- .../ExpenseReportsIdAuditsIdEndpoint.py | 9 +- .../manage/ExpenseReportsIdEndpoint.py | 48 +- .../manage/ExpenseReportsIdRejectEndpoint.py | 9 +- .../manage/ExpenseReportsIdReverseEndpoint.py | 9 +- .../manage/ExpenseReportsIdSubmitEndpoint.py | 9 +- .../manage/ExpenseTypesCountEndpoint.py | 12 +- .../endpoints/manage/ExpenseTypesEndpoint.py | 36 +- .../manage/ExpenseTypesIdEndpoint.py | 45 +- .../manage/ExpenseTypesIdInfoEndpoint.py | 9 +- .../manage/ExpenseTypesInfoEndpoint.py | 9 +- .../FinanceAccountingBatchesCountEndpoint.py | 12 +- .../FinanceAccountingBatchesEndpoint.py | 29 +- .../FinanceAccountingBatchesIdEndpoint.py | 34 +- ...AccountingBatchesIdEntriesCountEndpoint.py | 12 +- ...nanceAccountingBatchesIdEntriesEndpoint.py | 26 +- ...nceAccountingBatchesIdEntriesIdEndpoint.py | 12 +- ...inanceAccountingBatchesIdExportEndpoint.py | 8 +- .../manage/FinanceAccountingEndpoint.py | 37 +- .../manage/FinanceAccountingExportEndpoint.py | 8 +- ...anceAccountingPackageSetupCountEndpoint.py | 12 +- .../FinanceAccountingPackageSetupEndpoint.py | 27 +- ...FinanceAccountingPackageSetupIdEndpoint.py | 27 +- .../FinanceAccountingPackagesCountEndpoint.py | 12 +- .../FinanceAccountingPackagesEndpoint.py | 21 +- .../FinanceAccountingPackagesIdEndpoint.py | 9 +- ...AccountingUnpostedexpensesCountEndpoint.py | 12 +- ...nanceAccountingUnpostedexpensesEndpoint.py | 23 +- ...nceAccountingUnpostedexpensesIdEndpoint.py | 18 +- ...tedexpensesIdTaxableLevelsCountEndpoint.py | 16 +- ...UnpostedexpensesIdTaxableLevelsEndpoint.py | 25 +- ...postedexpensesIdTaxableLevelsIdEndpoint.py | 7 +- ...AccountingUnpostedinvoicesCountEndpoint.py | 12 +- ...nanceAccountingUnpostedinvoicesEndpoint.py | 23 +- ...nceAccountingUnpostedinvoicesIdEndpoint.py | 18 +- ...tedinvoicesIdTaxableLevelsCountEndpoint.py | 16 +- ...UnpostedinvoicesIdTaxableLevelsEndpoint.py | 25 +- ...postedinvoicesIdTaxableLevelsIdEndpoint.py | 7 +- ...ountingUnpostedprocurementCountEndpoint.py | 12 +- ...ceAccountingUnpostedprocurementEndpoint.py | 27 +- ...AccountingUnpostedprocurementIdEndpoint.py | 18 +- ...procurementIdTaxableLevelsCountEndpoint.py | 16 +- ...ostedprocurementIdTaxableLevelsEndpoint.py | 25 +- ...tedprocurementIdTaxableLevelsIdEndpoint.py | 11 +- ...eementTypesIdBoardDefaultsCountEndpoint.py | 12 +- ...ceAgreementTypesIdBoardDefaultsEndpoint.py | 32 +- ...AgreementTypesIdBoardDefaultsIdEndpoint.py | 34 +- ...tTypesIdWorkRoleExclusionsCountEndpoint.py | 12 +- ...eementTypesIdWorkRoleExclusionsEndpoint.py | 32 +- ...mentTypesIdWorkRoleExclusionsIdEndpoint.py | 16 +- ...tTypesIdWorkTypeExclusionsCountEndpoint.py | 12 +- ...eementTypesIdWorkTypeExclusionsEndpoint.py | 32 +- ...mentTypesIdWorkTypeExclusionsIdEndpoint.py | 16 +- ...eAgreementTypesIdWorkrolesCountEndpoint.py | 12 +- ...inanceAgreementTypesIdWorkrolesEndpoint.py | 43 +- ...anceAgreementTypesIdWorkrolesIdEndpoint.py | 36 +- ...eementTypesIdWorkrolesInfoCountEndpoint.py | 12 +- ...ceAgreementTypesIdWorkrolesInfoEndpoint.py | 25 +- ...AgreementTypesIdWorkrolesInfoIdEndpoint.py | 9 +- ...eAgreementTypesIdWorktypesCountEndpoint.py | 12 +- ...inanceAgreementTypesIdWorktypesEndpoint.py | 32 +- ...anceAgreementTypesIdWorktypesIdEndpoint.py | 36 +- .../manage/FinanceAgreementrecapEndpoint.py | 4 +- .../manage/FinanceAgreementrecapIdEndpoint.py | 9 +- .../manage/FinanceAgreementsCountEndpoint.py | 12 +- .../manage/FinanceAgreementsEndpoint.py | 40 +- ...nanceAgreementsIdAdditionsCountEndpoint.py | 12 +- .../FinanceAgreementsIdAdditionsEndpoint.py | 33 +- .../FinanceAgreementsIdAdditionsIdEndpoint.py | 37 +- ...nceAgreementsIdAdjustmentsCountEndpoint.py | 12 +- .../FinanceAgreementsIdAdjustmentsEndpoint.py | 34 +- ...inanceAgreementsIdAdjustmentsIdEndpoint.py | 37 +- ...reementsIdApplicationparametersEndpoint.py | 13 +- ...ementsIdApplicationparametersIdEndpoint.py | 7 +- ...eAgreementsIdBoardDefaultsCountEndpoint.py | 12 +- ...inanceAgreementsIdBoardDefaultsEndpoint.py | 30 +- ...anceAgreementsIdBoardDefaultsIdEndpoint.py | 34 +- ...AgreementsIdConfigurationsCountEndpoint.py | 12 +- ...nanceAgreementsIdConfigurationsEndpoint.py | 32 +- ...nceAgreementsIdConfigurationsIdEndpoint.py | 18 +- .../manage/FinanceAgreementsIdCopyEndpoint.py | 8 +- .../manage/FinanceAgreementsIdEndpoint.py | 141 +++-- ...AgreementsIdRecurringparametersEndpoint.py | 9 +- ...reementsIdRecurringparametersIdEndpoint.py | 7 +- .../FinanceAgreementsIdSitesCountEndpoint.py | 12 +- .../FinanceAgreementsIdSitesEndpoint.py | 29 +- .../FinanceAgreementsIdSitesIdEndpoint.py | 34 +- ...ementsIdWorkRoleExclusionsCountEndpoint.py | 12 +- ...eAgreementsIdWorkRoleExclusionsEndpoint.py | 32 +- ...greementsIdWorkRoleExclusionsIdEndpoint.py | 9 +- ...ementsIdWorkTypeExclusionsCountEndpoint.py | 12 +- ...eAgreementsIdWorkTypeExclusionsEndpoint.py | 32 +- ...greementsIdWorkTypeExclusionsIdEndpoint.py | 9 +- ...nanceAgreementsIdWorkrolesCountEndpoint.py | 12 +- .../FinanceAgreementsIdWorkrolesEndpoint.py | 31 +- .../FinanceAgreementsIdWorkrolesIdEndpoint.py | 36 +- ...nanceAgreementsIdWorktypesCountEndpoint.py | 12 +- .../FinanceAgreementsIdWorktypesEndpoint.py | 31 +- .../FinanceAgreementsIdWorktypesIdEndpoint.py | 36 +- .../FinanceAgreementsTypesCountEndpoint.py | 12 +- .../manage/FinanceAgreementsTypesEndpoint.py | 37 +- .../FinanceAgreementsTypesIdCopyEndpoint.py | 9 +- .../FinanceAgreementsTypesIdEndpoint.py | 54 +- .../FinanceAgreementsTypesIdInfoEndpoint.py | 9 +- .../FinanceAgreementsTypesIdUsagesEndpoint.py | 17 +- ...anceAgreementsTypesIdUsagesListEndpoint.py | 12 +- ...FinanceAgreementsTypesInfoCountEndpoint.py | 12 +- .../FinanceAgreementsTypesInfoEndpoint.py | 14 +- .../manage/FinanceAgreementtypesEndpoint.py | 4 +- .../manage/FinanceAgreementtypesIdEndpoint.py | 45 +- .../manage/FinanceBatchSetupsCountEndpoint.py | 12 +- .../manage/FinanceBatchSetupsEndpoint.py | 21 +- .../manage/FinanceBatchSetupsIdEndpoint.py | 27 +- .../FinanceBillingCyclesCountEndpoint.py | 12 +- .../manage/FinanceBillingCyclesEndpoint.py | 36 +- .../manage/FinanceBillingCyclesIdEndpoint.py | 50 +- .../FinanceBillingCyclesIdInfoEndpoint.py | 9 +- .../FinanceBillingCyclesIdUsagesEndpoint.py | 17 +- ...inanceBillingCyclesIdUsagesListEndpoint.py | 12 +- .../FinanceBillingCyclesInfoCountEndpoint.py | 12 +- .../FinanceBillingCyclesInfoEndpoint.py | 17 +- .../FinanceBillingSetupsCountEndpoint.py | 12 +- .../manage/FinanceBillingSetupsEndpoint.py | 36 +- .../manage/FinanceBillingSetupsIdEndpoint.py | 46 +- .../FinanceBillingSetupsIdInfoEndpoint.py | 9 +- ...nceBillingSetupsIdRoutingsCountEndpoint.py | 12 +- .../FinanceBillingSetupsIdRoutingsEndpoint.py | 32 +- ...inanceBillingSetupsIdRoutingsIdEndpoint.py | 36 +- .../FinanceBillingSetupsInfoEndpoint.py | 9 +- .../FinanceBillingStatusesCountEndpoint.py | 12 +- .../manage/FinanceBillingStatusesEndpoint.py | 37 +- .../FinanceBillingStatusesIdEndpoint.py | 46 +- .../FinanceBillingStatusesIdInfoEndpoint.py | 9 +- .../FinanceBillingStatusesIdUsagesEndpoint.py | 17 +- ...anceBillingStatusesIdUsagesListEndpoint.py | 12 +- ...FinanceBillingStatusesInfoCountEndpoint.py | 12 +- .../FinanceBillingStatusesInfoEndpoint.py | 14 +- .../FinanceBillingTermsCountEndpoint.py | 12 +- .../manage/FinanceBillingTermsEndpoint.py | 40 +- .../manage/FinanceBillingTermsIdEndpoint.py | 53 +- .../FinanceBillingTermsIdInfoEndpoint.py | 9 +- .../FinanceBillingTermsIdUsagesEndpoint.py | 21 +- ...FinanceBillingTermsIdUsagesListEndpoint.py | 12 +- .../FinanceBillingTermsInfoCountEndpoint.py | 12 +- .../manage/FinanceBillingTermsInfoEndpoint.py | 17 +- .../manage/FinanceClosedInvoicesIdEndpoint.py | 17 +- .../manage/FinanceClosedinvoicesEndpoint.py | 4 +- .../FinanceCompanyFinanceCountEndpoint.py | 12 +- .../manage/FinanceCompanyFinanceEndpoint.py | 12 +- .../manage/FinanceCompanyFinanceIdEndpoint.py | 18 +- .../manage/FinanceCurrenciesCountEndpoint.py | 12 +- .../manage/FinanceCurrenciesEndpoint.py | 40 +- .../manage/FinanceCurrenciesIdEndpoint.py | 53 +- .../manage/FinanceCurrenciesIdInfoEndpoint.py | 8 +- .../FinanceCurrenciesIdUsagesEndpoint.py | 20 +- .../FinanceCurrenciesIdUsagesListEndpoint.py | 12 +- .../FinanceCurrenciesInfoCountEndpoint.py | 12 +- .../manage/FinanceCurrenciesInfoEndpoint.py | 16 +- .../FinanceDeliveryMethodsCountEndpoint.py | 12 +- .../manage/FinanceDeliveryMethodsEndpoint.py | 30 +- .../FinanceDeliveryMethodsIdEndpoint.py | 36 +- .../endpoints/manage/FinanceEndpoint.py | 166 ++++-- .../manage/FinanceGlAccountsCountEndpoint.py | 12 +- .../manage/FinanceGlAccountsEndpoint.py | 36 +- .../manage/FinanceGlAccountsIdEndpoint.py | 37 +- ...nanceGlAccountsMappedTypesCountEndpoint.py | 12 +- .../FinanceGlAccountsMappedTypesEndpoint.py | 17 +- .../manage/FinanceGlCaptionsCountEndpoint.py | 12 +- .../manage/FinanceGlCaptionsEndpoint.py | 24 +- .../manage/FinanceGlCaptionsIdEndpoint.py | 28 +- .../manage/FinanceGlpathsCountEndpoint.py | 12 +- .../manage/FinanceGlpathsEndpoint.py | 32 +- .../manage/FinanceGlpathsIdEndpoint.py | 37 +- .../FinanceInfoCurrencyCodesCountEndpoint.py | 12 +- .../FinanceInfoCurrencyCodesEndpoint.py | 20 +- .../FinanceInfoCurrencyCodesIdEndpoint.py | 8 +- .../endpoints/manage/FinanceInfoEndpoint.py | 16 +- .../manage/FinanceInfoInvoiceEndpoint.py | 4 +- .../manage/FinanceInfoInvoiceIdEndpoint.py | 12 +- ...FinanceInfoTaxIntegrationsCountEndpoint.py | 12 +- .../FinanceInfoTaxIntegrationsEndpoint.py | 18 +- .../FinanceInfoTaxIntegrationsIdEndpoint.py | 9 +- ...nanceInvoiceEmailTemplatesCountEndpoint.py | 12 +- .../FinanceInvoiceEmailTemplatesEndpoint.py | 46 +- .../FinanceInvoiceEmailTemplatesIdEndpoint.py | 52 +- ...anceInvoiceEmailTemplatesIdInfoEndpoint.py | 9 +- ...ceInvoiceEmailTemplatesIdUsagesEndpoint.py | 21 +- ...voiceEmailTemplatesIdUsagesListEndpoint.py | 12 +- ...eInvoiceEmailTemplatesInfoCountEndpoint.py | 12 +- ...inanceInvoiceEmailTemplatesInfoEndpoint.py | 14 +- ...nanceInvoiceTemplateSetupsCountEndpoint.py | 12 +- .../FinanceInvoiceTemplateSetupsEndpoint.py | 26 +- .../FinanceInvoiceTemplateSetupsIdEndpoint.py | 9 +- .../FinanceInvoiceTemplatesCountEndpoint.py | 12 +- .../manage/FinanceInvoiceTemplatesEndpoint.py | 30 +- .../FinanceInvoiceTemplatesIdEndpoint.py | 41 +- ...FinanceInvoiceTemplatesIdUsagesEndpoint.py | 17 +- ...nceInvoiceTemplatesIdUsagesListEndpoint.py | 12 +- .../manage/FinanceInvoicesCountEndpoint.py | 12 +- .../manage/FinanceInvoicesEndpoint.py | 32 +- .../manage/FinanceInvoicesIdEndpoint.py | 53 +- .../FinanceInvoicesIdPaymentsEndpoint.py | 22 +- .../FinanceInvoicesIdPaymentsIdEndpoint.py | 36 +- .../manage/FinanceInvoicesIdPdfEndpoint.py | 9 +- .../manage/FinanceTaxCodesCountEndpoint.py | 12 +- .../manage/FinanceTaxCodesEndpoint.py | 40 +- .../manage/FinanceTaxCodesIdCopyEndpoint.py | 8 +- .../manage/FinanceTaxCodesIdEndpoint.py | 92 +++- ...desIdExpenseTypeExemptionsCountEndpoint.py | 12 +- ...TaxCodesIdExpenseTypeExemptionsEndpoint.py | 40 +- ...xCodesIdExpenseTypeExemptionsIdEndpoint.py | 45 +- ...IdTaxableExpenseTypeLevelsCountEndpoint.py | 16 +- ...tionsIdTaxableExpenseTypeLevelsEndpoint.py | 50 +- ...onsIdTaxableExpenseTypeLevelsIdEndpoint.py | 40 +- .../manage/FinanceTaxCodesIdInfoEndpoint.py | 12 +- ...desIdProductTypeExemptionsCountEndpoint.py | 12 +- ...TaxCodesIdProductTypeExemptionsEndpoint.py | 40 +- ...xCodesIdProductTypeExemptionsIdEndpoint.py | 45 +- ...IdTaxableProductTypeLevelsCountEndpoint.py | 16 +- ...tionsIdTaxableProductTypeLevelsEndpoint.py | 50 +- ...onsIdTaxableProductTypeLevelsIdEndpoint.py | 40 +- ...nceTaxCodesIdTaxCodeLevelsCountEndpoint.py | 12 +- .../FinanceTaxCodesIdTaxCodeLevelsEndpoint.py | 30 +- ...inanceTaxCodesIdTaxCodeLevelsIdEndpoint.py | 34 +- ...anceTaxCodesIdTaxCodeXRefsCountEndpoint.py | 12 +- .../FinanceTaxCodesIdTaxCodeXRefsEndpoint.py | 34 +- ...FinanceTaxCodesIdTaxCodeXRefsIdEndpoint.py | 46 +- ...deXRefsIdTaxableXRefLevelsCountEndpoint.py | 16 +- ...TaxCodeXRefsIdTaxableXRefLevelsEndpoint.py | 36 +- ...xCodeXRefsIdTaxableXRefLevelsIdEndpoint.py | 36 +- .../manage/FinanceTaxCodesIdUsagesEndpoint.py | 20 +- .../FinanceTaxCodesIdUsagesListEndpoint.py | 12 +- ...xCodesIdWorkRoleExemptionsCountEndpoint.py | 12 +- ...nceTaxCodesIdWorkRoleExemptionsEndpoint.py | 36 +- ...eTaxCodesIdWorkRoleExemptionsIdEndpoint.py | 45 +- ...onsIdTaxableWorkRoleLevelsCountEndpoint.py | 16 +- ...emptionsIdTaxableWorkRoleLevelsEndpoint.py | 48 +- ...ptionsIdTaxableWorkRoleLevelsIdEndpoint.py | 40 +- .../FinanceTaxCodesInfoCountEndpoint.py | 12 +- .../manage/FinanceTaxCodesInfoEndpoint.py | 20 +- .../FinanceTaxIntegrationsCountEndpoint.py | 12 +- .../manage/FinanceTaxIntegrationsEndpoint.py | 21 +- .../FinanceTaxIntegrationsIdEndpoint.py | 27 +- .../manage/MarketingCampaignsCountEndpoint.py | 12 +- .../manage/MarketingCampaignsEndpoint.py | 56 +- ...etingCampaignsIdActivitiesCountEndpoint.py | 12 +- .../MarketingCampaignsIdActivitiesEndpoint.py | 14 +- ...MarketingCampaignsIdAuditsCountEndpoint.py | 12 +- .../MarketingCampaignsIdAuditsEndpoint.py | 26 +- .../MarketingCampaignsIdAuditsIdEndpoint.py | 34 +- ...ingCampaignsIdEmailsOpenedCountEndpoint.py | 12 +- ...arketingCampaignsIdEmailsOpenedEndpoint.py | 34 +- ...ketingCampaignsIdEmailsOpenedIdEndpoint.py | 37 +- .../manage/MarketingCampaignsIdEndpoint.py | 75 ++- ...gCampaignsIdFormsSubmittedCountEndpoint.py | 12 +- ...ketingCampaignsIdFormsSubmittedEndpoint.py | 35 +- ...tingCampaignsIdFormsSubmittedIdEndpoint.py | 34 +- ...ingCampaignsIdLinksClickedCountEndpoint.py | 12 +- ...arketingCampaignsIdLinksClickedEndpoint.py | 34 +- ...ketingCampaignsIdLinksClickedIdEndpoint.py | 37 +- ...ngCampaignsIdOpportunitiesCountEndpoint.py | 12 +- ...rketingCampaignsIdOpportunitiesEndpoint.py | 14 +- ...MarketingCampaignsStatusesCountEndpoint.py | 12 +- .../MarketingCampaignsStatusesEndpoint.py | 27 +- .../MarketingCampaignsStatusesIdEndpoint.py | 36 +- ...MarketingCampaignsSubTypesCountEndpoint.py | 12 +- .../MarketingCampaignsSubTypesEndpoint.py | 27 +- .../MarketingCampaignsSubTypesIdEndpoint.py | 36 +- .../MarketingCampaignsTypesCountEndpoint.py | 12 +- .../manage/MarketingCampaignsTypesEndpoint.py | 36 +- .../MarketingCampaignsTypesIdEndpoint.py | 47 +- .../MarketingCampaignsTypesIdInfoEndpoint.py | 9 +- ...ngCampaignsTypesIdSubTypesCountEndpoint.py | 12 +- ...rketingCampaignsTypesIdSubTypesEndpoint.py | 23 +- ...etingCampaignsTypesIdSubTypesIdEndpoint.py | 9 +- ...arketingCampaignsTypesInfoCountEndpoint.py | 12 +- .../MarketingCampaignsTypesInfoEndpoint.py | 14 +- .../endpoints/manage/MarketingEndpoint.py | 16 +- .../manage/MarketingGroupsCountEndpoint.py | 12 +- .../manage/MarketingGroupsEndpoint.py | 40 +- ...MarketingGroupsIdCompaniesCountEndpoint.py | 12 +- .../MarketingGroupsIdCompaniesEndpoint.py | 27 +- .../MarketingGroupsIdContactsCountEndpoint.py | 12 +- .../MarketingGroupsIdContactsEndpoint.py | 30 +- .../MarketingGroupsIdContactsIdEndpoint.py | 36 +- .../manage/MarketingGroupsIdEndpoint.py | 69 ++- .../manage/MarketingGroupsIdInfoEndpoint.py | 12 +- .../manage/MarketingGroupsIdUsagesEndpoint.py | 20 +- .../MarketingGroupsIdUsagesListEndpoint.py | 12 +- .../MarketingGroupsInfoCountEndpoint.py | 12 +- .../manage/MarketingGroupsInfoEndpoint.py | 20 +- .../ProcurementAdjustmentsCountEndpoint.py | 12 +- .../manage/ProcurementAdjustmentsEndpoint.py | 38 +- ...rementAdjustmentsIdDetailsCountEndpoint.py | 12 +- ...ProcurementAdjustmentsIdDetailsEndpoint.py | 32 +- ...ocurementAdjustmentsIdDetailsIdEndpoint.py | 18 +- .../ProcurementAdjustmentsIdEndpoint.py | 41 +- ...rocurementAdjustmentsTypesCountEndpoint.py | 12 +- .../ProcurementAdjustmentsTypesEndpoint.py | 36 +- .../ProcurementAdjustmentsTypesIdEndpoint.py | 52 +- ...ocurementAdjustmentsTypesIdInfoEndpoint.py | 9 +- ...urementAdjustmentsTypesIdUsagesEndpoint.py | 21 +- ...entAdjustmentsTypesIdUsagesListEndpoint.py | 12 +- ...rementAdjustmentsTypesInfoCountEndpoint.py | 12 +- ...ProcurementAdjustmentsTypesInfoEndpoint.py | 14 +- .../manage/ProcurementCatalogCountEndpoint.py | 12 +- .../manage/ProcurementCatalogEndpoint.py | 40 +- ...urementCatalogIdComponentsCountEndpoint.py | 12 +- .../ProcurementCatalogIdComponentsEndpoint.py | 32 +- ...rocurementCatalogIdComponentsIdEndpoint.py | 36 +- .../manage/ProcurementCatalogIdEndpoint.py | 81 ++- .../ProcurementCatalogIdInfoEndpoint.py | 9 +- ...curementCatalogIdInventoryCountEndpoint.py | 12 +- .../ProcurementCatalogIdInventoryEndpoint.py | 23 +- ...ProcurementCatalogIdInventoryIdEndpoint.py | 9 +- ...gIdMinimumStockByWarehouseCountEndpoint.py | 12 +- ...atalogIdMinimumStockByWarehouseEndpoint.py | 40 +- ...alogIdMinimumStockByWarehouseIdEndpoint.py | 36 +- .../ProcurementCatalogIdPricingEndpoint.py | 9 +- ...curementCatalogIdQuantityonhandEndpoint.py | 12 +- .../ProcurementCatalogInfoCountEndpoint.py | 12 +- .../manage/ProcurementCatalogInfoEndpoint.py | 17 +- .../ProcurementCategoriesCountEndpoint.py | 12 +- .../manage/ProcurementCategoriesEndpoint.py | 40 +- .../manage/ProcurementCategoriesIdEndpoint.py | 50 +- .../ProcurementCategoriesIdInfoEndpoint.py | 8 +- ...tCategoriesIdSubcategoriesCountEndpoint.py | 12 +- ...rementCategoriesIdSubcategoriesEndpoint.py | 31 +- ...mentCategoriesIdSubcategoriesIdEndpoint.py | 45 +- ...CategoriesIdSubcategoriesIdInfoEndpoint.py | 9 +- ...egoriesIdSubcategoriesInfoCountEndpoint.py | 12 +- ...ntCategoriesIdSubcategoriesInfoEndpoint.py | 18 +- .../ProcurementCategoriesInfoCountEndpoint.py | 12 +- .../ProcurementCategoriesInfoEndpoint.py | 16 +- ...rocurementDirectionalsyncsCountEndpoint.py | 12 +- .../ProcurementDirectionalsyncsEndpoint.py | 27 +- .../ProcurementDirectionalsyncsIdEndpoint.py | 36 +- .../endpoints/manage/ProcurementEndpoint.py | 155 ++++-- .../ProcurementManufacturersCountEndpoint.py | 17 +- ...ocurementManufacturersCountInfoEndpoint.py | 12 +- .../ProcurementManufacturersEndpoint.py | 36 +- .../ProcurementManufacturersIdEndpoint.py | 42 +- .../ProcurementManufacturersIdInfoEndpoint.py | 9 +- .../ProcurementManufacturersInfoEndpoint.py | 9 +- ...urementOnhandserialnumbersCountEndpoint.py | 12 +- .../ProcurementOnhandserialnumbersEndpoint.py | 23 +- ...rocurementOnhandserialnumbersIdEndpoint.py | 9 +- ...rocurementPricingschedulesCountEndpoint.py | 12 +- .../ProcurementPricingschedulesEndpoint.py | 27 +- ...tPricingschedulesIdDetailsCountEndpoint.py | 12 +- ...rementPricingschedulesIdDetailsEndpoint.py | 35 +- ...schedulesIdDetailsIdBreaksCountEndpoint.py | 12 +- ...icingschedulesIdDetailsIdBreaksEndpoint.py | 34 +- ...ingschedulesIdDetailsIdBreaksIdEndpoint.py | 34 +- ...mentPricingschedulesIdDetailsIdEndpoint.py | 43 +- .../ProcurementPricingschedulesIdEndpoint.py | 41 +- .../ProcurementProductsCountEndpoint.py | 12 +- .../manage/ProcurementProductsEndpoint.py | 32 +- ...rementProductsIdComponentsCountEndpoint.py | 12 +- ...ProcurementProductsIdComponentsEndpoint.py | 32 +- ...ocurementProductsIdComponentsIdEndpoint.py | 36 +- .../ProcurementProductsIdDetachEndpoint.py | 9 +- .../manage/ProcurementProductsIdEndpoint.py | 63 ++- ...tsIdPickingShippingDetailsCountEndpoint.py | 12 +- ...roductsIdPickingShippingDetailsEndpoint.py | 36 +- ...ductsIdPickingShippingDetailsIdEndpoint.py | 30 +- .../ProcurementPurchaseordersCountEndpoint.py | 12 +- .../ProcurementPurchaseordersEndpoint.py | 29 +- .../ProcurementPurchaseordersIdEndpoint.py | 55 +- ...ntPurchaseordersIdLineitemsBulkEndpoint.py | 24 +- ...tPurchaseordersIdLineitemsCountEndpoint.py | 12 +- ...rementPurchaseordersIdLineitemsEndpoint.py | 58 +- ...mentPurchaseordersIdLineitemsIdEndpoint.py | 27 +- ...curementPurchaseordersIdRebatchEndpoint.py | 9 +- ...curementPurchaseordersIdUnbatchEndpoint.py | 9 +- ...ementPurchaseorderstatusesCountEndpoint.py | 12 +- ...rocurementPurchaseorderstatusesEndpoint.py | 36 +- ...erstatusesIdEmailtemplatesCountEndpoint.py | 16 +- ...seorderstatusesIdEmailtemplatesEndpoint.py | 18 +- ...orderstatusesIdEmailtemplatesIdEndpoint.py | 30 +- ...curementPurchaseorderstatusesIdEndpoint.py | 67 ++- ...derstatusesIdNotificationsCountEndpoint.py | 12 +- ...aseorderstatusesIdNotificationsEndpoint.py | 28 +- ...eorderstatusesIdNotificationsIdEndpoint.py | 30 +- ...ntPurchaseorderstatusesIdUsagesEndpoint.py | 21 +- ...rchaseorderstatusesIdUsagesListEndpoint.py | 12 +- .../ProcurementPurchasingDemandsEndpoint.py | 9 +- ...ProcurementRMADispositionsCountEndpoint.py | 12 +- .../ProcurementRMADispositionsEndpoint.py | 35 +- .../ProcurementRMADispositionsIdEndpoint.py | 41 +- ...rocurementRMADispositionsIdInfoEndpoint.py | 9 +- ...urementRMADispositionsInfoCountEndpoint.py | 12 +- .../ProcurementRMADispositionsInfoEndpoint.py | 14 +- .../ProcurementRmaActionsCountEndpoint.py | 12 +- .../manage/ProcurementRmaActionsEndpoint.py | 40 +- .../manage/ProcurementRmaActionsIdEndpoint.py | 45 +- .../ProcurementRmaActionsIdInfoEndpoint.py | 8 +- .../ProcurementRmaActionsInfoCountEndpoint.py | 12 +- .../ProcurementRmaActionsInfoEndpoint.py | 16 +- .../ProcurementRmaStatusesCountEndpoint.py | 12 +- .../manage/ProcurementRmaStatusesEndpoint.py | 40 +- ...maStatusesIdEmailtemplatesCountEndpoint.py | 12 +- ...ntRmaStatusesIdEmailtemplatesIdEndpoint.py | 36 +- .../ProcurementRmaStatusesIdEndpoint.py | 69 ++- .../ProcurementRmaStatusesIdInfoEndpoint.py | 8 +- ...RmaStatusesIdNotificationsCountEndpoint.py | 12 +- ...ementRmaStatusesIdNotificationsEndpoint.py | 36 +- ...entRmaStatusesIdNotificationsIdEndpoint.py | 36 +- .../ProcurementRmaStatusesIdUsagesEndpoint.py | 17 +- ...curementRmaStatusesIdUsagesListEndpoint.py | 12 +- ...ProcurementRmaStatusesInfoCountEndpoint.py | 12 +- .../ProcurementRmaStatusesInfoEndpoint.py | 13 +- .../manage/ProcurementRmaTagsCountEndpoint.py | 12 +- .../ProcurementRmaTagsDefaultEndpoint.py | 12 +- .../manage/ProcurementRmaTagsEndpoint.py | 40 +- .../manage/ProcurementRmaTagsIdEndpoint.py | 37 +- .../ProcurementSettingsCountEndpoint.py | 12 +- .../manage/ProcurementSettingsEndpoint.py | 21 +- .../manage/ProcurementSettingsIdEndpoint.py | 27 +- ...ProcurementShipmentmethodsCountEndpoint.py | 12 +- .../ProcurementShipmentmethodsEndpoint.py | 35 +- .../ProcurementShipmentmethodsIdEndpoint.py | 52 +- ...rocurementShipmentmethodsIdInfoEndpoint.py | 9 +- ...curementShipmentmethodsIdUsagesEndpoint.py | 17 +- ...mentShipmentmethodsIdUsagesListEndpoint.py | 12 +- ...urementShipmentmethodsInfoCountEndpoint.py | 12 +- .../ProcurementShipmentmethodsInfoEndpoint.py | 14 +- .../ProcurementSubcategoriesCountEndpoint.py | 12 +- .../ProcurementSubcategoriesEndpoint.py | 20 +- .../ProcurementSubcategoriesIdEndpoint.py | 50 +- .../ProcurementSubcategoriesIdInfoEndpoint.py | 9 +- ...rocurementSubcategoriesIdUsagesEndpoint.py | 17 +- ...rementSubcategoriesIdUsagesListEndpoint.py | 12 +- ...ocurementSubcategoriesInfoCountEndpoint.py | 12 +- .../ProcurementSubcategoriesInfoEndpoint.py | 5 +- .../manage/ProcurementTypesCountEndpoint.py | 12 +- .../manage/ProcurementTypesEndpoint.py | 40 +- .../manage/ProcurementTypesIdEndpoint.py | 53 +- .../manage/ProcurementTypesIdInfoEndpoint.py | 9 +- .../ProcurementTypesIdUsagesEndpoint.py | 20 +- .../ProcurementTypesIdUsagesListEndpoint.py | 12 +- .../ProcurementTypesInfoCountEndpoint.py | 12 +- .../manage/ProcurementTypesInfoEndpoint.py | 17 +- .../ProcurementUnitOfMeasuresCountEndpoint.py | 12 +- .../ProcurementUnitOfMeasuresEndpoint.py | 29 +- ...nitOfMeasuresIdConversionsCountEndpoint.py | 12 +- ...mentUnitOfMeasuresIdConversionsEndpoint.py | 38 +- ...ntUnitOfMeasuresIdConversionsIdEndpoint.py | 37 +- .../ProcurementUnitOfMeasuresIdEndpoint.py | 39 +- .../ProcurementWarehouseBinsCountEndpoint.py | 12 +- .../ProcurementWarehouseBinsEndpoint.py | 36 +- .../ProcurementWarehouseBinsIdEndpoint.py | 51 +- .../ProcurementWarehouseBinsIdInfoEndpoint.py | 9 +- ...houseBinsIdInventoryOnHandCountEndpoint.py | 12 +- ...tWarehouseBinsIdInventoryOnHandEndpoint.py | 27 +- ...arehouseBinsIdInventoryOnHandIdEndpoint.py | 9 +- ...ocurementWarehouseBinsInfoCountEndpoint.py | 12 +- .../ProcurementWarehouseBinsInfoEndpoint.py | 14 +- .../ProcurementWarehousesCountEndpoint.py | 12 +- .../manage/ProcurementWarehousesEndpoint.py | 40 +- .../manage/ProcurementWarehousesIdEndpoint.py | 45 +- .../ProcurementWarehousesIdInfoEndpoint.py | 8 +- .../ProcurementWarehousesInfoCountEndpoint.py | 12 +- .../ProcurementWarehousesInfoEndpoint.py | 16 +- .../manage/ProjectBillingratesEndpoint.py | 4 +- ...ojectBillingratesIdBillingratesEndpoint.py | 9 +- ...ectBillingratesIdBillingratesIdEndpoint.py | 9 +- .../manage/ProjectBillingratesIdEndpoint.py | 5 +- .../endpoints/manage/ProjectBoardsEndpoint.py | 4 +- .../manage/ProjectBoardsIdEndpoint.py | 8 +- .../ProjectBoardsIdTeamsCountEndpoint.py | 12 +- .../manage/ProjectBoardsIdTeamsEndpoint.py | 38 +- .../manage/ProjectBoardsIdTeamsIdEndpoint.py | 48 +- ...ProjectBoardsIdTeamsIdInfoCountEndpoint.py | 12 +- .../ProjectBoardsIdTeamsIdInfoEndpoint.py | 14 +- .../ProjectBoardsIdTeamsIdMembersEndpoint.py | 27 +- ...ProjectBoardsIdTeamsIdMembersIdEndpoint.py | 36 +- .../ProjectBoardsIdTeamsInfoEndpoint.py | 9 +- .../endpoints/manage/ProjectEndpoint.py | 76 ++- .../ProjectIdBillingratesCountEndpoint.py | 12 +- .../manage/ProjectIdBillingratesEndpoint.py | 30 +- .../manage/ProjectIdBillingratesIdEndpoint.py | 27 +- .../endpoints/manage/ProjectIdEndpoint.py | 8 +- .../ProjectPhaseStatusesCountEndpoint.py | 12 +- .../manage/ProjectPhaseStatusesEndpoint.py | 32 +- .../manage/ProjectPhaseStatusesIdEndpoint.py | 45 +- .../ProjectPhaseStatusesIdUsagesEndpoint.py | 17 +- ...rojectPhaseStatusesIdUsagesListEndpoint.py | 12 +- .../ProjectProjectTypesCountEndpoint.py | 12 +- .../manage/ProjectProjectTypesEndpoint.py | 40 +- .../manage/ProjectProjectTypesIdEndpoint.py | 53 +- .../ProjectProjectTypesIdInfoEndpoint.py | 9 +- .../ProjectProjectTypesIdUsagesEndpoint.py | 21 +- ...ProjectProjectTypesIdUsagesListEndpoint.py | 12 +- .../ProjectProjectTypesInfoCountEndpoint.py | 12 +- .../manage/ProjectProjectTypesInfoEndpoint.py | 17 +- .../manage/ProjectProjectsCountEndpoint.py | 12 +- .../manage/ProjectProjectsEndpoint.py | 32 +- .../ProjectProjectsIdContactsEndpoint.py | 22 +- .../ProjectProjectsIdContactsIdEndpoint.py | 18 +- .../manage/ProjectProjectsIdEndpoint.py | 70 ++- .../ProjectProjectsIdNotesCountEndpoint.py | 12 +- .../manage/ProjectProjectsIdNotesEndpoint.py | 32 +- .../ProjectProjectsIdNotesIdEndpoint.py | 37 +- .../ProjectProjectsIdPhasesCountEndpoint.py | 12 +- .../manage/ProjectProjectsIdPhasesEndpoint.py | 28 +- .../ProjectProjectsIdPhasesIdEndpoint.py | 34 +- ...tProjectsIdProjectworkplanCountEndpoint.py | 12 +- ...rojectProjectsIdProjectworkplanEndpoint.py | 23 +- ...jectProjectsIdProjectworkplanIdEndpoint.py | 9 +- ...ojectProjectsIdTeamMembersCountEndpoint.py | 12 +- .../ProjectProjectsIdTeamMembersEndpoint.py | 31 +- .../ProjectProjectsIdTeamMembersIdEndpoint.py | 36 +- .../ProjectProjecttemplatesCountEndpoint.py | 12 +- .../manage/ProjectProjecttemplatesEndpoint.py | 12 +- .../ProjectProjecttemplatesIdEndpoint.py | 54 +- ...esIdProjecttemplateticketsCountEndpoint.py | 12 +- ...mplatesIdProjecttemplateticketsEndpoint.py | 40 +- ...latesIdProjecttemplateticketsIdEndpoint.py | 45 +- ...jecttemplateticketsIdTasksCountEndpoint.py | 16 +- ...IdProjecttemplateticketsIdTasksEndpoint.py | 44 +- ...ProjecttemplateticketsIdTasksIdEndpoint.py | 40 +- ...ojectProjecttemplatesIdWorkplanEndpoint.py | 9 +- .../ProjectSecurityRolesCountEndpoint.py | 12 +- .../manage/ProjectSecurityRolesEndpoint.py | 30 +- .../manage/ProjectSecurityRolesIdEndpoint.py | 40 +- ...ectSecurityRolesIdSettingsCountEndpoint.py | 12 +- .../ProjectSecurityRolesIdSettingsEndpoint.py | 21 +- ...rojectSecurityRolesIdSettingsIdEndpoint.py | 21 +- .../ProjectStatusIndicatorsCountEndpoint.py | 12 +- .../manage/ProjectStatusIndicatorsEndpoint.py | 21 +- .../ProjectStatusIndicatorsIdEndpoint.py | 9 +- .../manage/ProjectStatusesCountEndpoint.py | 12 +- .../manage/ProjectStatusesEndpoint.py | 37 +- .../manage/ProjectStatusesIdEndpoint.py | 50 +- .../manage/ProjectStatusesIdInfoEndpoint.py | 9 +- .../manage/ProjectStatusesIdUsagesEndpoint.py | 20 +- .../ProjectStatusesIdUsagesListEndpoint.py | 12 +- .../ProjectStatusesInfoCountEndpoint.py | 12 +- .../manage/ProjectStatusesInfoEndpoint.py | 17 +- .../manage/ProjectTicketnoteEndpoint.py | 4 +- .../manage/ProjectTicketnoteIdEndpoint.py | 8 +- .../manage/ProjectTicketsCountEndpoint.py | 12 +- .../manage/ProjectTicketsEndpoint.py | 37 +- ...ProjectTicketsIdActivitiesCountEndpoint.py | 12 +- .../ProjectTicketsIdActivitiesEndpoint.py | 14 +- .../ProjectTicketsIdAllNotesEndpoint.py | 9 +- ...ectTicketsIdConfigurationsCountEndpoint.py | 12 +- .../ProjectTicketsIdConfigurationsEndpoint.py | 32 +- ...rojectTicketsIdConfigurationsIdEndpoint.py | 18 +- .../manage/ProjectTicketsIdConvertEndpoint.py | 9 +- .../ProjectTicketsIdDocumentsCountEndpoint.py | 12 +- .../ProjectTicketsIdDocumentsEndpoint.py | 17 +- .../manage/ProjectTicketsIdEndpoint.py | 103 +++- .../ProjectTicketsIdNotesCountEndpoint.py | 12 +- .../manage/ProjectTicketsIdNotesEndpoint.py | 32 +- .../manage/ProjectTicketsIdNotesIdEndpoint.py | 37 +- .../ProjectTicketsIdProductsCountEndpoint.py | 12 +- .../ProjectTicketsIdProductsEndpoint.py | 17 +- ...ctTicketsIdScheduleentriesCountEndpoint.py | 12 +- ...ProjectTicketsIdScheduleentriesEndpoint.py | 14 +- .../ProjectTicketsIdTasksCountEndpoint.py | 12 +- .../manage/ProjectTicketsIdTasksEndpoint.py | 32 +- .../manage/ProjectTicketsIdTasksIdEndpoint.py | 37 +- ...rojectTicketsIdTimeentriesCountEndpoint.py | 12 +- .../ProjectTicketsIdTimeentriesEndpoint.py | 14 +- .../manage/ProjectTicketsSearchEndpoint.py | 9 +- .../manage/SalesActivitiesCountEndpoint.py | 12 +- .../manage/SalesActivitiesEndpoint.py | 48 +- .../manage/SalesActivitiesIdEndpoint.py | 37 +- .../SalesActivitiesStatusesCountEndpoint.py | 12 +- .../manage/SalesActivitiesStatusesEndpoint.py | 38 +- .../SalesActivitiesStatusesIdEndpoint.py | 44 +- .../SalesActivitiesStatusesIdInfoEndpoint.py | 9 +- ...alesActivitiesStatusesInfoCountEndpoint.py | 12 +- .../SalesActivitiesStatusesInfoEndpoint.py | 14 +- .../SalesActivitiesTypesCountEndpoint.py | 12 +- .../manage/SalesActivitiesTypesEndpoint.py | 28 +- .../manage/SalesActivitiesTypesIdEndpoint.py | 42 +- .../SalesActivitiesTypesIdUsagesEndpoint.py | 17 +- ...alesActivitiesTypesIdUsagesListEndpoint.py | 12 +- .../manage/SalesCommissionsCountEndpoint.py | 12 +- .../manage/SalesCommissionsEndpoint.py | 32 +- .../manage/SalesCommissionsIdEndpoint.py | 45 +- .../SalesCommissionsIdUsagesEndpoint.py | 20 +- .../SalesCommissionsIdUsagesListEndpoint.py | 12 +- .../endpoints/manage/SalesEndpoint.py | 64 ++- .../manage/SalesOpportunitiesCountEndpoint.py | 12 +- .../SalesOpportunitiesDefaultEndpoint.py | 12 +- .../manage/SalesOpportunitiesEndpoint.py | 64 ++- ...lesOpportunitiesIdContactsCountEndpoint.py | 12 +- .../SalesOpportunitiesIdContactsEndpoint.py | 31 +- .../SalesOpportunitiesIdContactsIdEndpoint.py | 36 +- ...portunitiesIdConvertToAgreementEndpoint.py | 8 +- ...OpportunitiesIdConvertToProjectEndpoint.py | 8 +- ...ortunitiesIdConvertToSalesOrderEndpoint.py | 8 +- ...unitiesIdConvertToServiceTicketEndpoint.py | 12 +- .../manage/SalesOpportunitiesIdEndpoint.py | 101 ++-- ...alesOpportunitiesIdForecastCopyEndpoint.py | 9 +- ...esOpportunitiesIdForecastCopyIdEndpoint.py | 9 +- ...lesOpportunitiesIdForecastCountEndpoint.py | 12 +- .../SalesOpportunitiesIdForecastEndpoint.py | 44 +- .../SalesOpportunitiesIdForecastIdEndpoint.py | 42 +- .../SalesOpportunitiesIdNotesCountEndpoint.py | 9 +- .../SalesOpportunitiesIdNotesEndpoint.py | 30 +- .../SalesOpportunitiesIdNotesIdEndpoint.py | 36 +- .../SalesOpportunitiesIdTeamCountEndpoint.py | 12 +- .../SalesOpportunitiesIdTeamEndpoint.py | 32 +- .../SalesOpportunitiesIdTeamIdEndpoint.py | 29 +- .../SalesOpportunitiesRatingsCountEndpoint.py | 12 +- .../SalesOpportunitiesRatingsEndpoint.py | 38 +- .../SalesOpportunitiesRatingsIdEndpoint.py | 45 +- ...SalesOpportunitiesRatingsIdInfoEndpoint.py | 9 +- ...esOpportunitiesRatingsInfoCountEndpoint.py | 12 +- .../SalesOpportunitiesRatingsInfoEndpoint.py | 14 +- ...SalesOpportunitiesStatusesCountEndpoint.py | 12 +- .../SalesOpportunitiesStatusesEndpoint.py | 35 +- .../SalesOpportunitiesStatusesIdEndpoint.py | 52 +- ...alesOpportunitiesStatusesIdInfoEndpoint.py | 9 +- ...esOpportunitiesStatusesIdUsagesEndpoint.py | 17 +- ...portunitiesStatusesIdUsagesListEndpoint.py | 12 +- ...sOpportunitiesStatusesInfoCountEndpoint.py | 12 +- .../SalesOpportunitiesStatusesInfoEndpoint.py | 14 +- .../SalesOpportunitiesTypesCountEndpoint.py | 12 +- .../manage/SalesOpportunitiesTypesEndpoint.py | 38 +- .../SalesOpportunitiesTypesIdEndpoint.py | 49 +- .../SalesOpportunitiesTypesIdInfoEndpoint.py | 9 +- ...SalesOpportunitiesTypesIdUsagesEndpoint.py | 17 +- ...sOpportunitiesTypesIdUsagesListEndpoint.py | 12 +- ...alesOpportunitiesTypesInfoCountEndpoint.py | 12 +- .../SalesOpportunitiesTypesInfoEndpoint.py | 14 +- .../manage/SalesOrdersCountEndpoint.py | 12 +- .../endpoints/manage/SalesOrdersEndpoint.py | 36 +- ...sOrdersIdConvertToServiceTicketEndpoint.py | 12 +- .../endpoints/manage/SalesOrdersIdEndpoint.py | 42 +- .../SalesOrdersStatusesCountEndpoint.py | 12 +- .../manage/SalesOrdersStatusesEndpoint.py | 40 +- ...rsStatusesIdEmailtemplatesCountEndpoint.py | 12 +- ...sOrdersStatusesIdEmailtemplatesEndpoint.py | 18 +- ...rdersStatusesIdEmailtemplatesIdEndpoint.py | 34 +- .../manage/SalesOrdersStatusesIdEndpoint.py | 63 ++- .../SalesOrdersStatusesIdInfoEndpoint.py | 9 +- ...ersStatusesIdNotificationsCountEndpoint.py | 12 +- ...esOrdersStatusesIdNotificationsEndpoint.py | 36 +- ...OrdersStatusesIdNotificationsIdEndpoint.py | 36 +- .../SalesOrdersStatusesIdUsagesEndpoint.py | 21 +- ...SalesOrdersStatusesIdUsagesListEndpoint.py | 12 +- .../SalesOrdersStatusesInfoCountEndpoint.py | 12 +- .../manage/SalesOrdersStatusesInfoEndpoint.py | 17 +- .../manage/SalesProbabilitiesCountEndpoint.py | 12 +- .../manage/SalesProbabilitiesEndpoint.py | 38 +- .../manage/SalesProbabilitiesIdEndpoint.py | 44 +- .../SalesProbabilitiesIdInfoEndpoint.py | 9 +- .../SalesProbabilitiesInfoCountEndpoint.py | 12 +- .../manage/SalesProbabilitiesInfoEndpoint.py | 17 +- .../manage/SalesQuotasCountEndpoint.py | 12 +- .../endpoints/manage/SalesQuotasEndpoint.py | 28 +- .../endpoints/manage/SalesQuotasIdEndpoint.py | 37 +- .../manage/SalesRolesCountEndpoint.py | 12 +- .../endpoints/manage/SalesRolesEndpoint.py | 28 +- .../endpoints/manage/SalesRolesIdEndpoint.py | 29 +- .../manage/SalesSalesTeamsCountEndpoint.py | 12 +- .../manage/SalesSalesTeamsEndpoint.py | 32 +- .../manage/SalesSalesTeamsIdEndpoint.py | 45 +- .../SalesSalesTeamsIdMembersCountEndpoint.py | 12 +- .../SalesSalesTeamsIdMembersEndpoint.py | 30 +- .../SalesSalesTeamsIdMembersIdEndpoint.py | 36 +- .../endpoints/manage/SalesScheduleEndpoint.py | 4 +- .../SalesScheduleHolidaylistsEndpoint.py | 12 +- .../SalesScheduleHolidaylistsIdEndpoint.py | 5 +- ...sScheduleHolidaylistsIdHolidaysEndpoint.py | 9 +- ...HolidaylistsIdHolidaysInfoCountEndpoint.py | 12 +- ...eduleHolidaylistsIdHolidaysInfoEndpoint.py | 9 +- ...esScheduleHolidaylistsInfoCountEndpoint.py | 12 +- .../SalesScheduleHolidaylistsInfoEndpoint.py | 5 +- .../endpoints/manage/SalesServiceEndpoint.py | 8 +- .../manage/SalesServicePriorityEndpoint.py | 8 +- .../SalesServicePriorityInfoCountEndpoint.py | 12 +- .../SalesServicePriorityInfoEndpoint.py | 8 +- .../manage/SalesStagesCountEndpoint.py | 12 +- .../endpoints/manage/SalesStagesEndpoint.py | 34 +- .../endpoints/manage/SalesStagesIdEndpoint.py | 52 +- .../manage/SalesStagesIdInfoEndpoint.py | 9 +- .../manage/SalesStagesIdUsagesEndpoint.py | 20 +- .../manage/SalesStagesIdUsagesListEndpoint.py | 12 +- .../manage/SalesStagesInfoCountEndpoint.py | 12 +- .../manage/SalesStagesInfoEndpoint.py | 17 +- .../manage/ScheduleCalendarsCountEndpoint.py | 12 +- .../manage/ScheduleCalendarsEndpoint.py | 40 +- .../manage/ScheduleCalendarsIdCopyEndpoint.py | 8 +- .../manage/ScheduleCalendarsIdEndpoint.py | 61 ++- .../manage/ScheduleCalendarsIdInfoEndpoint.py | 8 +- .../ScheduleCalendarsIdUsagesEndpoint.py | 20 +- .../ScheduleCalendarsIdUsagesListEndpoint.py | 12 +- .../ScheduleCalendarsInfoCountEndpoint.py | 8 +- .../manage/ScheduleCalendarsInfoEndpoint.py | 16 +- .../manage/ScheduleColorsCountEndpoint.py | 12 +- .../manage/ScheduleColorsEndpoint.py | 28 +- .../manage/ScheduleColorsIdClearEndpoint.py | 9 +- .../manage/ScheduleColorsIdEndpoint.py | 33 +- .../manage/ScheduleColorsResetEndpoint.py | 9 +- .../manage/ScheduleDetailsCountEndpoint.py | 12 +- .../manage/ScheduleDetailsEndpoint.py | 21 +- .../manage/ScheduleDetailsIdEndpoint.py | 9 +- .../endpoints/manage/ScheduleEndpoint.py | 64 ++- .../manage/ScheduleEntriesCountEndpoint.py | 12 +- .../manage/ScheduleEntriesEndpoint.py | 29 +- .../ScheduleEntriesIdDetailsCountEndpoint.py | 12 +- .../ScheduleEntriesIdDetailsEndpoint.py | 21 +- .../ScheduleEntriesIdDetailsIdEndpoint.py | 9 +- .../manage/ScheduleEntriesIdEndpoint.py | 42 +- .../ScheduleHolidayListsCopyEndpoint.py | 8 +- .../ScheduleHolidayListsCountEndpoint.py | 12 +- .../manage/ScheduleHolidayListsEndpoint.py | 12 +- .../manage/ScheduleHolidayListsIdEndpoint.py | 12 +- ...duleHolidayListsIdHolidaysCountEndpoint.py | 12 +- .../ScheduleHolidayListsIdHolidaysEndpoint.py | 14 +- ...cheduleHolidayListsIdHolidaysIdEndpoint.py | 5 +- .../ScheduleHolidayListsIdUsagesEndpoint.py | 17 +- ...cheduleHolidayListsIdUsagesListEndpoint.py | 12 +- ...uleHolidaylistsIdHolidaysIdInfoEndpoint.py | 12 +- ...eduleHolidaylistsIdHolidaysInfoEndpoint.py | 12 +- .../ScheduleHolidaylistsIdInfoEndpoint.py | 9 +- .../ScheduleHolidaylistsInfoEndpoint.py | 9 +- .../SchedulePortalcalendarsCountEndpoint.py | 12 +- .../manage/SchedulePortalcalendarsEndpoint.py | 21 +- .../SchedulePortalcalendarsIdEndpoint.py | 27 +- .../ScheduleReminderTimesCountEndpoint.py | 12 +- .../manage/ScheduleReminderTimesEndpoint.py | 21 +- .../manage/ScheduleReminderTimesIdEndpoint.py | 27 +- .../manage/ScheduleStatusesCountEndpoint.py | 12 +- .../manage/ScheduleStatusesEndpoint.py | 30 +- .../manage/ScheduleStatusesIdEndpoint.py | 36 +- .../manage/ScheduleTypesCountEndpoint.py | 12 +- .../endpoints/manage/ScheduleTypesEndpoint.py | 36 +- .../manage/ScheduleTypesIdEndpoint.py | 50 +- .../manage/ScheduleTypesIdInfoEndpoint.py | 9 +- .../manage/ScheduleTypesIdUsagesEndpoint.py | 20 +- .../ScheduleTypesIdUsagesListEndpoint.py | 12 +- .../manage/ScheduleTypesInfoCountEndpoint.py | 12 +- .../manage/ScheduleTypesInfoEndpoint.py | 17 +- .../manage/ServiceBoardsCopyEndpoint.py | 8 +- .../manage/ServiceBoardsCountEndpoint.py | 12 +- .../endpoints/manage/ServiceBoardsEndpoint.py | 40 +- ...oardsIdAutoAssignResourcesCountEndpoint.py | 12 +- ...viceBoardsIdAutoAssignResourcesEndpoint.py | 36 +- ...ceBoardsIdAutoAssignResourcesIdEndpoint.py | 36 +- ...rviceBoardsIdAutoTemplatesCountEndpoint.py | 12 +- .../ServiceBoardsIdAutoTemplatesEndpoint.py | 31 +- .../ServiceBoardsIdAutoTemplatesIdEndpoint.py | 36 +- .../manage/ServiceBoardsIdEndpoint.py | 125 +++-- ...iceBoardsIdExcludedMembersCountEndpoint.py | 12 +- .../ServiceBoardsIdExcludedMembersEndpoint.py | 32 +- ...erviceBoardsIdExcludedMembersIdEndpoint.py | 18 +- .../ServiceBoardsIdItemsCountEndpoint.py | 12 +- .../manage/ServiceBoardsIdItemsEndpoint.py | 32 +- ...oardsIdItemsIdAssociationsCountEndpoint.py | 12 +- ...viceBoardsIdItemsIdAssociationsEndpoint.py | 27 +- ...ceBoardsIdItemsIdAssociationsIdEndpoint.py | 27 +- .../manage/ServiceBoardsIdItemsIdEndpoint.py | 50 +- .../ServiceBoardsIdItemsIdUsagesEndpoint.py | 17 +- ...erviceBoardsIdItemsIdUsagesListEndpoint.py | 12 +- ...rviceBoardsIdNotificationsCountEndpoint.py | 12 +- .../ServiceBoardsIdNotificationsEndpoint.py | 31 +- .../ServiceBoardsIdNotificationsIdEndpoint.py | 36 +- .../ServiceBoardsIdStatusesCountEndpoint.py | 12 +- .../manage/ServiceBoardsIdStatusesEndpoint.py | 40 +- .../ServiceBoardsIdStatusesIdEndpoint.py | 55 +- .../ServiceBoardsIdStatusesIdInfoEndpoint.py | 9 +- ...sIdStatusesIdNotificationsCountEndpoint.py | 12 +- ...BoardsIdStatusesIdNotificationsEndpoint.py | 36 +- ...ardsIdStatusesIdNotificationsIdEndpoint.py | 36 +- ...ServiceBoardsIdStatusesIdUsagesEndpoint.py | 17 +- ...iceBoardsIdStatusesIdUsagesListEndpoint.py | 12 +- ...erviceBoardsIdStatusesInfoCountEndpoint.py | 12 +- .../ServiceBoardsIdStatusesInfoEndpoint.py | 14 +- .../ServiceBoardsIdSubtypesCountEndpoint.py | 12 +- .../manage/ServiceBoardsIdSubtypesEndpoint.py | 36 +- .../ServiceBoardsIdSubtypesIdEndpoint.py | 47 +- .../ServiceBoardsIdSubtypesIdInfoEndpoint.py | 9 +- ...ServiceBoardsIdSubtypesIdUsagesEndpoint.py | 17 +- ...iceBoardsIdSubtypesIdUsagesListEndpoint.py | 12 +- ...erviceBoardsIdSubtypesInfoCountEndpoint.py | 12 +- .../ServiceBoardsIdSubtypesInfoEndpoint.py | 14 +- .../ServiceBoardsIdTeamsCountEndpoint.py | 12 +- .../manage/ServiceBoardsIdTeamsEndpoint.py | 40 +- .../manage/ServiceBoardsIdTeamsIdEndpoint.py | 53 +- .../ServiceBoardsIdTeamsIdInfoEndpoint.py | 8 +- .../ServiceBoardsIdTeamsIdUsagesEndpoint.py | 5 +- ...erviceBoardsIdTeamsIdUsagesListEndpoint.py | 12 +- .../ServiceBoardsIdTeamsInfoCountEndpoint.py | 12 +- .../ServiceBoardsIdTeamsInfoEndpoint.py | 16 +- ...ypeSubTypeItemAssociationsCountEndpoint.py | 12 +- ...dsIdTypeSubTypeItemAssociationsEndpoint.py | 25 +- ...IdTypeSubTypeItemAssociationsIdEndpoint.py | 7 +- .../ServiceBoardsIdTypesCountEndpoint.py | 12 +- .../manage/ServiceBoardsIdTypesEndpoint.py | 32 +- .../manage/ServiceBoardsIdTypesIdEndpoint.py | 45 +- .../ServiceBoardsIdTypesIdUsagesEndpoint.py | 17 +- ...erviceBoardsIdTypesIdUsagesListEndpoint.py | 12 +- .../manage/ServiceBoardsIdUsagesEndpoint.py | 20 +- .../ServiceBoardsIdUsagesListEndpoint.py | 12 +- .../manage/ServiceCodesCountEndpoint.py | 12 +- .../endpoints/manage/ServiceCodesEndpoint.py | 28 +- .../manage/ServiceCodesIdEndpoint.py | 29 +- .../ServiceEmailTemplatesCountEndpoint.py | 12 +- .../manage/ServiceEmailTemplatesEndpoint.py | 30 +- .../manage/ServiceEmailTemplatesIdEndpoint.py | 44 +- .../ServiceEmailTemplatesIdUsagesEndpoint.py | 17 +- ...rviceEmailTemplatesIdUsagesListEndpoint.py | 12 +- .../endpoints/manage/ServiceEndpoint.py | 145 +++-- .../manage/ServiceImpactsCountEndpoint.py | 12 +- .../manage/ServiceImpactsEndpoint.py | 24 +- .../manage/ServiceImpactsIdEndpoint.py | 28 +- .../manage/ServiceInfoBoardsCountEndpoint.py | 12 +- .../manage/ServiceInfoBoardsEndpoint.py | 24 +- .../manage/ServiceInfoBoardsIdEndpoint.py | 12 +- .../ServiceInfoBoardtypesCountEndpoint.py | 12 +- .../manage/ServiceInfoBoardtypesEndpoint.py | 20 +- .../manage/ServiceInfoBoardtypesIdEndpoint.py | 8 +- .../endpoints/manage/ServiceInfoEndpoint.py | 16 +- ...rviceKnowledgeBaseArticlesCountEndpoint.py | 12 +- .../ServiceKnowledgeBaseArticlesEndpoint.py | 35 +- .../ServiceKnowledgeBaseArticlesIdEndpoint.py | 36 +- ...iceKnowledgeBaseCategoriesCountEndpoint.py | 12 +- .../ServiceKnowledgeBaseCategoriesEndpoint.py | 36 +- ...erviceKnowledgeBaseCategoriesIdEndpoint.py | 36 +- ...KnowledgeBaseSubCategoriesCountEndpoint.py | 12 +- ...rviceKnowledgeBaseSubCategoriesEndpoint.py | 36 +- ...iceKnowledgeBaseSubCategoriesIdEndpoint.py | 43 +- ...wledgeBaseSubCategoriesIdUsagesEndpoint.py | 21 +- ...geBaseSubCategoriesIdUsagesListEndpoint.py | 12 +- .../ServiceKnowledgebasesettingsEndpoint.py | 30 +- .../ServiceKnowledgebasesettingsIdEndpoint.py | 27 +- .../manage/ServiceLocationsCountEndpoint.py | 12 +- .../manage/ServiceLocationsEndpoint.py | 38 +- .../manage/ServiceLocationsIdEndpoint.py | 44 +- .../manage/ServiceLocationsIdInfoEndpoint.py | 9 +- .../ServiceLocationsInfoCountEndpoint.py | 12 +- .../manage/ServiceLocationsInfoEndpoint.py | 17 +- .../manage/ServicePrioritiesCountEndpoint.py | 12 +- .../manage/ServicePrioritiesEndpoint.py | 32 +- .../manage/ServicePrioritiesIdEndpoint.py | 53 +- .../ServicePrioritiesIdImageEndpoint.py | 9 +- .../ServicePrioritiesIdUsagesEndpoint.py | 20 +- .../ServicePrioritiesIdUsagesListEndpoint.py | 12 +- .../manage/ServicePriorityEndpoint.py | 12 +- .../manage/ServicePriorityIdEndpoint.py | 8 +- .../manage/ServicePriorityIdInfoEndpoint.py | 8 +- .../manage/ServicePriorityInfoEndpoint.py | 8 +- .../manage/ServiceSLAsCountEndpoint.py | 12 +- .../endpoints/manage/ServiceSLAsEndpoint.py | 8 +- .../endpoints/manage/ServiceSLAsIdEndpoint.py | 8 +- .../ServiceSLAsIdPrioritiesCountEndpoint.py | 12 +- .../manage/ServiceSLAsIdPrioritiesEndpoint.py | 32 +- .../ServiceSLAsIdPrioritiesIdEndpoint.py | 37 +- .../manage/ServiceSLAsIdUsagesEndpoint.py | 20 +- .../manage/ServiceSLAsIdUsagesListEndpoint.py | 12 +- .../manage/ServiceSLAsInfoCountEndpoint.py | 12 +- .../manage/ServiceSchedulingEndpoint.py | 8 +- .../ServiceSchedulingMembersEndpoint.py | 12 +- .../ServiceSchedulingMembersIdEndpoint.py | 8 +- .../ServiceSchedulingMembersIdInfoEndpoint.py | 9 +- ...rviceSchedulingMembersInfoCountEndpoint.py | 12 +- .../ServiceSchedulingMembersInfoEndpoint.py | 14 +- .../ServiceServiceSignoffCountEndpoint.py | 12 +- .../manage/ServiceServiceSignoffEndpoint.py | 38 +- .../manage/ServiceServiceSignoffIdEndpoint.py | 61 ++- .../ServiceServiceSignoffIdInfoEndpoint.py | 9 +- .../ServiceServiceSignoffIdUsagesEndpoint.py | 17 +- ...rviceServiceSignoffIdUsagesListEndpoint.py | 12 +- .../ServiceServiceSignoffInfoCountEndpoint.py | 12 +- .../ServiceServiceSignoffInfoEndpoint.py | 17 +- ...gnoffIdSignoffcustomfieldsCountEndpoint.py | 12 +- ...icesignoffIdSignoffcustomfieldsEndpoint.py | 32 +- ...esignoffIdSignoffcustomfieldsIdEndpoint.py | 34 +- .../manage/ServiceSeveritiesCountEndpoint.py | 12 +- .../manage/ServiceSeveritiesEndpoint.py | 24 +- .../manage/ServiceSeveritiesIdEndpoint.py | 28 +- .../manage/ServiceSlasIdInfoEndpoint.py | 12 +- .../manage/ServiceSlasInfoEndpoint.py | 8 +- .../manage/ServiceSourcesCountEndpoint.py | 12 +- .../manage/ServiceSourcesEndpoint.py | 40 +- .../manage/ServiceSourcesIdEndpoint.py | 53 +- .../manage/ServiceSourcesIdInfoEndpoint.py | 12 +- .../manage/ServiceSourcesIdUsagesEndpoint.py | 20 +- .../ServiceSourcesIdUsagesListEndpoint.py | 12 +- .../manage/ServiceSourcesInfoCountEndpoint.py | 12 +- .../manage/ServiceSourcesInfoEndpoint.py | 20 +- .../manage/ServiceSurveysCountEndpoint.py | 12 +- .../manage/ServiceSurveysEndpoint.py | 29 +- .../manage/ServiceSurveysIdCopyEndpoint.py | 9 +- .../manage/ServiceSurveysIdEndpoint.py | 66 ++- .../ServiceSurveysIdQuestionsCountEndpoint.py | 12 +- .../ServiceSurveysIdQuestionsEndpoint.py | 30 +- ...ServiceSurveysIdQuestionsIdCopyEndpoint.py | 9 +- .../ServiceSurveysIdQuestionsIdEndpoint.py | 50 +- ...urveysIdQuestionsIdOptionsCountEndpoint.py | 12 +- ...viceSurveysIdQuestionsIdOptionsEndpoint.py | 34 +- ...ceSurveysIdQuestionsIdOptionsIdEndpoint.py | 34 +- .../ServiceSurveysIdResultsCountEndpoint.py | 12 +- .../manage/ServiceSurveysIdResultsEndpoint.py | 28 +- .../ServiceSurveysIdResultsIdEndpoint.py | 34 +- .../manage/ServiceSurveysIdUsagesEndpoint.py | 20 +- .../ServiceSurveysIdUsagesListEndpoint.py | 12 +- .../manage/ServiceTeamMembersEndpoint.py | 8 +- .../manage/ServiceTeamsCountEndpoint.py | 12 +- .../endpoints/manage/ServiceTeamsEndpoint.py | 20 +- .../manage/ServiceTeamsIdEndpoint.py | 12 +- .../manage/ServiceTemplatesCountEndpoint.py | 12 +- .../manage/ServiceTemplatesEndpoint.py | 29 +- .../manage/ServiceTemplatesIdEndpoint.py | 25 +- .../ServiceTemplatesIdGenerateEndpoint.py | 7 +- .../manage/ServiceTemplatesIdInfoEndpoint.py | 9 +- .../ServiceTemplatesInfoCountEndpoint.py | 12 +- .../manage/ServiceTemplatesInfoEndpoint.py | 17 +- .../manage/ServiceTicketLinksCountEndpoint.py | 12 +- .../manage/ServiceTicketLinksEndpoint.py | 38 +- .../manage/ServiceTicketLinksIdEndpoint.py | 44 +- .../ServiceTicketLinksIdInfoEndpoint.py | 9 +- .../ServiceTicketLinksInfoCountEndpoint.py | 12 +- .../manage/ServiceTicketLinksInfoEndpoint.py | 17 +- .../manage/ServiceTicketSyncsCountEndpoint.py | 12 +- .../manage/ServiceTicketSyncsEndpoint.py | 32 +- .../manage/ServiceTicketSyncsIdEndpoint.py | 37 +- .../manage/ServiceTicketsCountEndpoint.py | 12 +- .../manage/ServiceTicketsEndpoint.py | 48 +- ...ServiceTicketsIdActivitiesCountEndpoint.py | 12 +- .../ServiceTicketsIdActivitiesEndpoint.py | 14 +- .../ServiceTicketsIdAllNotesEndpoint.py | 9 +- .../ServiceTicketsIdAttachChildrenEndpoint.py | 9 +- ...iceTicketsIdConfigurationsCountEndpoint.py | 12 +- .../ServiceTicketsIdConfigurationsEndpoint.py | 32 +- ...erviceTicketsIdConfigurationsIdEndpoint.py | 18 +- .../manage/ServiceTicketsIdConvertEndpoint.py | 9 +- .../ServiceTicketsIdDocumentsCountEndpoint.py | 12 +- .../ServiceTicketsIdDocumentsEndpoint.py | 17 +- .../manage/ServiceTicketsIdEndpoint.py | 130 +++-- .../manage/ServiceTicketsIdInfoEndpoint.py | 12 +- .../manage/ServiceTicketsIdMergeEndpoint.py | 9 +- .../ServiceTicketsIdNotesCountEndpoint.py | 12 +- .../manage/ServiceTicketsIdNotesEndpoint.py | 32 +- .../manage/ServiceTicketsIdNotesIdEndpoint.py | 37 +- .../ServiceTicketsIdProductsCountEndpoint.py | 12 +- .../ServiceTicketsIdProductsEndpoint.py | 17 +- ...ceTicketsIdScheduleentriesCountEndpoint.py | 12 +- ...ServiceTicketsIdScheduleentriesEndpoint.py | 14 +- .../ServiceTicketsIdTasksCountEndpoint.py | 12 +- .../manage/ServiceTicketsIdTasksEndpoint.py | 32 +- .../manage/ServiceTicketsIdTasksIdEndpoint.py | 29 +- ...erviceTicketsIdTimeentriesCountEndpoint.py | 12 +- .../ServiceTicketsIdTimeentriesEndpoint.py | 14 +- .../manage/ServiceTicketsInfoCountEndpoint.py | 12 +- .../manage/ServiceTicketsInfoEndpoint.py | 20 +- .../manage/ServiceTicketsSearchEndpoint.py | 8 +- .../SystemAllowedfiletypesCountEndpoint.py | 12 +- .../SystemAllowedfiletypesIdEndpoint.py | 36 +- .../SystemAllowedoriginsCountEndpoint.py | 12 +- .../manage/SystemAllowedoriginsEndpoint.py | 29 +- .../manage/SystemAllowedoriginsIdEndpoint.py | 34 +- .../manage/SystemApiMembersCountEndpoint.py | 12 +- .../manage/SystemApiMembersDefaultEndpoint.py | 12 +- .../manage/SystemApiMembersEndpoint.py | 40 +- .../manage/SystemApiMembersIdEndpoint.py | 28 +- .../manage/SystemAudittrailCountEndpoint.py | 12 +- .../manage/SystemAudittrailEndpoint.py | 17 +- .../manage/SystemAuthAnvilsCountEndpoint.py | 12 +- .../manage/SystemAuthAnvilsEndpoint.py | 28 +- .../manage/SystemAuthAnvilsIdEndpoint.py | 28 +- .../SystemAuthAnvilsTestConnectionEndpoint.py | 9 +- .../manage/SystemAutoSyncTimeCountEndpoint.py | 12 +- .../manage/SystemAutoSyncTimeEndpoint.py | 28 +- .../manage/SystemAutoSyncTimeIdEndpoint.py | 34 +- .../manage/SystemBundlesCountEndpoint.py | 9 +- .../endpoints/manage/SystemBundlesEndpoint.py | 17 +- .../manage/SystemCallbacksCountEndpoint.py | 12 +- .../manage/SystemCallbacksEndpoint.py | 29 +- .../manage/SystemCallbacksIdEndpoint.py | 34 +- .../SystemCertificationsCountEndpoint.py | 12 +- .../manage/SystemCertificationsEndpoint.py | 29 +- .../manage/SystemCertificationsIdEndpoint.py | 42 +- .../SystemCertificationsIdUsagesEndpoint.py | 17 +- ...ystemCertificationsIdUsagesListEndpoint.py | 12 +- ...emConnectWiseHostedScreensCountEndpoint.py | 12 +- .../SystemConnectWiseHostedScreensEndpoint.py | 27 +- ...ystemConnectWiseHostedScreensIdEndpoint.py | 9 +- ...temConnectwisehostedsetupsCountEndpoint.py | 12 +- .../SystemConnectwisehostedsetupsEndpoint.py | 36 +- ...SystemConnectwisehostedsetupsIdEndpoint.py | 36 +- .../manage/SystemContactsyncEndpoint.py | 4 +- ...ystemContactsyncMonitoringCountEndpoint.py | 12 +- .../SystemContactsyncMonitoringEndpoint.py | 34 +- .../SystemContactsyncMonitoringIdEndpoint.py | 9 +- ...SystemContactsyncMonitoringTypeEndpoint.py | 9 +- ...stemContactsyncMonitoringTypeIdEndpoint.py | 18 +- .../SystemCustomReportsCountEndpoint.py | 12 +- .../manage/SystemCustomReportsEndpoint.py | 28 +- .../manage/SystemCustomReportsIdEndpoint.py | 39 +- ...mCustomReportsIdParametersCountEndpoint.py | 12 +- ...SystemCustomReportsIdParametersEndpoint.py | 32 +- ...stemCustomReportsIdParametersIdEndpoint.py | 36 +- .../manage/SystemCwTimeZonesCountEndpoint.py | 12 +- .../manage/SystemCwTimeZonesEndpoint.py | 24 +- .../manage/SystemCwTimeZonesIdEndpoint.py | 12 +- .../manage/SystemDepartmentsCountEndpoint.py | 12 +- .../manage/SystemDepartmentsEndpoint.py | 32 +- .../manage/SystemDepartmentsIdEndpoint.py | 49 +- ...stemDepartmentsIdLocationsCountEndpoint.py | 12 +- .../SystemDepartmentsIdLocationsEndpoint.py | 31 +- .../SystemDepartmentsIdLocationsIdEndpoint.py | 36 +- .../SystemDepartmentsIdUsagesEndpoint.py | 20 +- .../SystemDepartmentsIdUsagesListEndpoint.py | 12 +- .../manage/SystemDirectionalsyncsEndpoint.py | 12 +- .../SystemDirectionalsyncsIdEndpoint.py | 8 +- .../SystemDirectionalsyncsIdInfoEndpoint.py | 9 +- ...SystemDirectionalsyncsInfoCountEndpoint.py | 12 +- .../SystemDirectionalsyncsInfoEndpoint.py | 14 +- .../manage/SystemDocumentsCountEndpoint.py | 12 +- .../manage/SystemDocumentsEndpoint.py | 32 +- .../manage/SystemDocumentsIdEndpoint.py | 41 +- .../SystemDocumentsUploadsampleEndpoint.py | 9 +- .../manage/SystemDocumenttypesEndpoint.py | 12 +- .../manage/SystemDocumenttypesIdEndpoint.py | 8 +- .../SystemDocumenttypesIdInfoEndpoint.py | 8 +- .../SystemDocumenttypesInfoCountEndpoint.py | 12 +- .../manage/SystemDocumenttypesInfoEndpoint.py | 16 +- .../SystemEPayConfigurationsCountEndpoint.py | 12 +- .../SystemEPayConfigurationsEndpoint.py | 30 +- .../SystemEPayConfigurationsIdEndpoint.py | 36 +- .../SystemEmailConnectorsCountEndpoint.py | 12 +- .../manage/SystemEmailConnectorsEndpoint.py | 38 +- .../manage/SystemEmailConnectorsIdEndpoint.py | 49 +- .../SystemEmailConnectorsIdInfoEndpoint.py | 9 +- ...lConnectorsIdParsingStylesCountEndpoint.py | 12 +- ...mEmailConnectorsIdParsingStylesEndpoint.py | 32 +- ...mailConnectorsIdParsingStylesIdEndpoint.py | 39 +- ...arsingStylesIdParsingRulesCountEndpoint.py | 16 +- ...rsIdParsingStylesIdParsingRulesEndpoint.py | 36 +- ...IdParsingStylesIdParsingRulesIdEndpoint.py | 34 +- .../SystemEmailConnectorsInfoCountEndpoint.py | 12 +- .../SystemEmailConnectorsInfoEndpoint.py | 17 +- .../SystemEmailExclusionsCountEndpoint.py | 12 +- .../manage/SystemEmailExclusionsEndpoint.py | 30 +- .../manage/SystemEmailExclusionsIdEndpoint.py | 36 +- .../manage/SystemEmailTokensCountEndpoint.py | 12 +- .../manage/SystemEmailTokensEndpoint.py | 24 +- .../manage/SystemEmailTokensIdEndpoint.py | 12 +- .../endpoints/manage/SystemEndpoint.py | 517 +++++++++++++----- .../manage/SystemExperimentsCountEndpoint.py | 12 +- .../manage/SystemExperimentsEndpoint.py | 24 +- .../manage/SystemExperimentsIdEndpoint.py | 12 +- .../SystemFileuploadsettingsCountEndpoint.py | 12 +- .../SystemFileuploadsettingsEndpoint.py | 12 +- .../SystemFileuploadsettingsIdEndpoint.py | 27 +- .../SystemGoogleemailsetupCountEndpoint.py | 12 +- .../manage/SystemGoogleemailsetupEndpoint.py | 12 +- .../SystemGoogleemailsetupIdEndpoint.py | 41 +- ...oogleemailsetupIdTestConnectionEndpoint.py | 9 +- .../manage/SystemImapsCountEndpoint.py | 12 +- .../endpoints/manage/SystemImapsEndpoint.py | 36 +- .../endpoints/manage/SystemImapsIdEndpoint.py | 37 +- .../manage/SystemImapsIdInfoEndpoint.py | 12 +- .../manage/SystemImapsInfoCountEndpoint.py | 12 +- .../manage/SystemImapsInfoEndpoint.py | 20 +- .../SystemImportMassMaintenanceIdEndpoint.py | 9 +- .../SystemImportmassmaintenanceEndpoint.py | 8 +- .../manage/SystemInOutBoardsCountEndpoint.py | 12 +- .../manage/SystemInOutBoardsEndpoint.py | 32 +- .../manage/SystemInOutBoardsIdEndpoint.py | 37 +- .../manage/SystemInOutTypesCountEndpoint.py | 20 +- .../SystemInOutTypesCountInfoEndpoint.py | 12 +- .../manage/SystemInOutTypesEndpoint.py | 40 +- .../manage/SystemInOutTypesIdEndpoint.py | 45 +- .../manage/SystemInOutTypesIdInfoEndpoint.py | 8 +- .../manage/SystemInOutTypesInfoEndpoint.py | 8 +- ...temInfoDepartmentlocationsCountEndpoint.py | 12 +- .../SystemInfoDepartmentlocationsEndpoint.py | 23 +- ...SystemInfoDepartmentlocationsIdEndpoint.py | 9 +- .../SystemInfoDepartmentsCountEndpoint.py | 12 +- .../manage/SystemInfoDepartmentsEndpoint.py | 21 +- .../manage/SystemInfoDepartmentsIdEndpoint.py | 9 +- .../endpoints/manage/SystemInfoEndpoint.py | 68 ++- .../manage/SystemInfoLinksCountEndpoint.py | 12 +- .../manage/SystemInfoLinksEndpoint.py | 24 +- .../manage/SystemInfoLinksIdEndpoint.py | 16 +- .../SystemInfoLinksIdResolveurlEndpoint.py | 9 +- .../manage/SystemInfoLocalesCountEndpoint.py | 12 +- .../manage/SystemInfoLocalesEndpoint.py | 24 +- .../manage/SystemInfoLocalesIdEndpoint.py | 12 +- .../SystemInfoLocationsCountEndpoint.py | 12 +- .../manage/SystemInfoLocationsEndpoint.py | 20 +- .../manage/SystemInfoLocationsIdEndpoint.py | 8 +- .../manage/SystemInfoMembersCountEndpoint.py | 12 +- .../manage/SystemInfoMembersEndpoint.py | 24 +- .../manage/SystemInfoMembersIdEndpoint.py | 12 +- .../manage/SystemInfoPersonasCountEndpoint.py | 12 +- .../manage/SystemInfoPersonasEndpoint.py | 20 +- .../manage/SystemInfoPersonasIdEndpoint.py | 8 +- .../SystemInfoStandardNotesCountEndpoint.py | 12 +- .../manage/SystemInfoStandardNotesEndpoint.py | 21 +- .../SystemInfoStandardNotesIdEndpoint.py | 9 +- .../SystemIntegratorTagsCountEndpoint.py | 12 +- .../manage/SystemIntegratorTagsEndpoint.py | 29 +- .../manage/SystemIntegratorTagsIdEndpoint.py | 34 +- .../SystemIntegratorloginsCountEndpoint.py | 12 +- .../manage/SystemIntegratorloginsEndpoint.py | 30 +- .../SystemIntegratorloginsIdEndpoint.py | 36 +- .../SystemKpiCategoriesCountEndpoint.py | 12 +- .../manage/SystemKpiCategoriesEndpoint.py | 24 +- .../manage/SystemKpiCategoriesIdEndpoint.py | 12 +- .../manage/SystemKpisCountEndpoint.py | 12 +- .../endpoints/manage/SystemKpisEndpoint.py | 20 +- .../endpoints/manage/SystemKpisIdEndpoint.py | 8 +- .../SystemLdapConfigurationsCountEndpoint.py | 12 +- .../SystemLdapConfigurationsEndpoint.py | 43 +- .../SystemLdapConfigurationsIdEndpoint.py | 44 +- .../SystemLdapConfigurationsIdInfoEndpoint.py | 9 +- ...stemLdapConfigurationsInfoCountEndpoint.py | 12 +- .../SystemLdapConfigurationsInfoEndpoint.py | 14 +- ...ystemLdapConfigurationsTestLinkEndpoint.py | 9 +- .../manage/SystemLinksCountEndpoint.py | 12 +- .../endpoints/manage/SystemLinksEndpoint.py | 28 +- .../endpoints/manage/SystemLinksIdEndpoint.py | 29 +- .../manage/SystemLocationsCountEndpoint.py | 12 +- .../manage/SystemLocationsEndpoint.py | 32 +- ...stemLocationsIdDepartmentsCountEndpoint.py | 12 +- .../SystemLocationsIdDepartmentsEndpoint.py | 22 +- .../SystemLocationsIdDepartmentsIdEndpoint.py | 9 +- .../manage/SystemLocationsIdEndpoint.py | 53 +- .../manage/SystemLocationsIdUsagesEndpoint.py | 20 +- .../SystemLocationsIdUsagesListEndpoint.py | 12 +- ...SystemLocationsIdWorkRolesCountEndpoint.py | 12 +- .../SystemLocationsIdWorkRolesEndpoint.py | 18 +- .../SystemLocationsIdWorkRolesIdEndpoint.py | 9 +- ...emM365contactsyncCheckvalidsyncEndpoint.py | 9 +- .../manage/SystemM365contactsyncEndpoint.py | 45 +- .../manage/SystemM365contactsyncIdEndpoint.py | 21 +- .../SystemM365contactsyncIdInfoEndpoint.py | 9 +- .../SystemM365contactsyncInfoCountEndpoint.py | 12 +- .../SystemM365contactsyncInfoEndpoint.py | 17 +- ...65contactsyncNotifydeactivationEndpoint.py | 9 +- ...ystemM365contactsyncNotifyerrorEndpoint.py | 9 +- ...anagementNetworkSecuritiesCountEndpoint.py | 12 +- ...stemManagementNetworkSecuritiesEndpoint.py | 32 +- ...emManagementNetworkSecuritiesIdEndpoint.py | 43 +- ...workSecuritiesIdTestCredentialsEndpoint.py | 9 +- .../manage/SystemMarketplaceimportEndpoint.py | 9 +- ...mMarketplaceimportGetdefinitionEndpoint.py | 9 +- ...arketplaceimportGetdefinitionIdEndpoint.py | 9 +- .../SystemMarketplaceimportImportEndpoint.py | 9 +- .../manage/SystemMembersCountEndpoint.py | 12 +- .../endpoints/manage/SystemMembersEndpoint.py | 48 +- .../SystemMembersIdAccrualsCountEndpoint.py | 12 +- .../manage/SystemMembersIdAccrualsEndpoint.py | 29 +- .../SystemMembersIdAccrualsIdEndpoint.py | 34 +- ...temMembersIdCertificationsCountEndpoint.py | 12 +- .../SystemMembersIdCertificationsEndpoint.py | 32 +- ...SystemMembersIdCertificationsIdEndpoint.py | 36 +- .../SystemMembersIdDeactivateEndpoint.py | 9 +- ...SystemMembersIdDelegationsCountEndpoint.py | 12 +- .../SystemMembersIdDelegationsEndpoint.py | 27 +- .../SystemMembersIdDelegationsIdEndpoint.py | 36 +- .../manage/SystemMembersIdEndpoint.py | 136 +++-- .../manage/SystemMembersIdImageEndpoint.py | 9 +- .../SystemMembersIdLinkSsoUserEndpoint.py | 9 +- ...bersIdManagedDeviceAccountsBulkEndpoint.py | 16 +- ...mMembersIdManagedDeviceAccountsEndpoint.py | 22 +- ...mMembersIdMycertificationsCountEndpoint.py | 12 +- ...SystemMembersIdMycertificationsEndpoint.py | 32 +- ...stemMembersIdMycertificationsIdEndpoint.py | 36 +- ...bersIdNotificationSettingsCountEndpoint.py | 12 +- ...emMembersIdNotificationSettingsEndpoint.py | 36 +- ...MembersIdNotificationSettingsIdEndpoint.py | 34 +- .../SystemMembersIdPersonasCountEndpoint.py | 12 +- .../manage/SystemMembersIdPersonasEndpoint.py | 29 +- .../SystemMembersIdPersonasIdEndpoint.py | 34 +- .../SystemMembersIdSkillsCountEndpoint.py | 12 +- .../manage/SystemMembersIdSkillsEndpoint.py | 32 +- .../manage/SystemMembersIdSkillsIdEndpoint.py | 37 +- .../manage/SystemMembersIdSubmitEndpoint.py | 9 +- .../manage/SystemMembersIdTokensEndpoint.py | 8 +- .../SystemMembersIdUnlinkSsoUserEndpoint.py | 9 +- ...SystemMembersIdUnusedTimeSheetsEndpoint.py | 9 +- .../manage/SystemMembersIdUsagesEndpoint.py | 20 +- .../SystemMembersIdUsagesListEndpoint.py | 12 +- .../manage/SystemMembersTypesCountEndpoint.py | 12 +- .../manage/SystemMembersTypesEndpoint.py | 40 +- .../manage/SystemMembersTypesIdEndpoint.py | 45 +- .../SystemMembersTypesIdInfoEndpoint.py | 9 +- .../SystemMembersTypesInfoCountEndpoint.py | 12 +- .../manage/SystemMembersTypesInfoEndpoint.py | 17 +- .../manage/SystemMembersWithSsoEndpoint.py | 12 +- .../SystemMembertemplatesCountEndpoint.py | 12 +- .../manage/SystemMembertemplatesEndpoint.py | 12 +- .../manage/SystemMembertemplatesIdEndpoint.py | 18 +- ...stemMenuEntriesIdLocationsCountEndpoint.py | 12 +- .../SystemMenuEntriesIdLocationsEndpoint.py | 31 +- .../SystemMenuEntriesIdLocationsIdEndpoint.py | 18 +- .../manage/SystemMenuentriesCountEndpoint.py | 12 +- .../manage/SystemMenuentriesEndpoint.py | 4 +- .../manage/SystemMenuentriesIdEndpoint.py | 4 +- .../SystemMenuentriesIdImageEndpoint.py | 18 +- ...stemMyAccountIdDelegationsCountEndpoint.py | 12 +- .../SystemMyAccountIdDelegationsEndpoint.py | 31 +- .../SystemMyAccountIdDelegationsIdEndpoint.py | 36 +- .../manage/SystemMyAccountIdEndpoint.py | 40 +- .../SystemMyAccountIdSkillsCountEndpoint.py | 12 +- .../manage/SystemMyAccountIdSkillsEndpoint.py | 32 +- .../SystemMyAccountIdSkillsIdEndpoint.py | 37 +- ...yCompanyCorporateStructureCountEndpoint.py | 12 +- ...stemMyCompanyCorporateStructureEndpoint.py | 34 +- ...emMyCompanyCorporateStructureIdEndpoint.py | 36 +- ...CompanyCorporateStructureIdInfoEndpoint.py | 9 +- ...panyCorporateStructureInfoCountEndpoint.py | 12 +- ...MyCompanyCorporateStructureInfoEndpoint.py | 18 +- ...nyCorporateStructureLevelsCountEndpoint.py | 12 +- ...CompanyCorporateStructureLevelsEndpoint.py | 31 +- ...mpanyCorporateStructureLevelsIdEndpoint.py | 9 +- .../manage/SystemMyCompanyCrmCountEndpoint.py | 12 +- .../manage/SystemMyCompanyCrmEndpoint.py | 32 +- .../manage/SystemMyCompanyCrmIdEndpoint.py | 28 +- .../SystemMyCompanyCrmIdInfoEndpoint.py | 12 +- .../SystemMyCompanyCrmInfoCountEndpoint.py | 12 +- .../manage/SystemMyCompanyCrmInfoEndpoint.py | 20 +- .../SystemMyCompanyOtherCountEndpoint.py | 12 +- .../manage/SystemMyCompanyOtherEndpoint.py | 24 +- .../manage/SystemMyCompanyOtherIdEndpoint.py | 28 +- ...SystemMyCompanyTimeExpenseCountEndpoint.py | 12 +- .../SystemMyCompanyTimeExpenseEndpoint.py | 21 +- .../SystemMyCompanyTimeExpenseIdEndpoint.py | 28 +- .../manage/SystemMyMembersEndpoint.py | 20 +- .../manage/SystemMyMembersInfoEndpoint.py | 8 +- .../manage/SystemMySecurityEndpoint.py | 16 +- .../manage/SystemMyaccountEndpoint.py | 4 +- .../SystemMycompanyDocumentsEndpoint.py | 12 +- .../SystemMycompanyDocumentsIdEndpoint.py | 25 +- .../manage/SystemMycompanyEndpoint.py | 4 +- .../manage/SystemMycompanyInfoEndpoint.py | 8 +- .../SystemMycompanyInfoServicesEndpoint.py | 16 +- .../SystemMycompanyInfoServicesIdEndpoint.py | 12 +- ...ystemMycompanyReportingServicesEndpoint.py | 18 +- ...temMycompanyReportingServicesIdEndpoint.py | 36 +- ...portingServicesIdTestConnectionEndpoint.py | 9 +- .../manage/SystemMycompanyServicesEndpoint.py | 16 +- .../SystemMycompanyServicesIdEndpoint.py | 28 +- ...stemNotificationRecipientsCountEndpoint.py | 12 +- .../SystemNotificationRecipientsEndpoint.py | 26 +- .../SystemNotificationRecipientsIdEndpoint.py | 9 +- ...SystemOffice365EmailSetupsCountEndpoint.py | 12 +- .../SystemOffice365EmailSetupsEndpoint.py | 27 +- ...Office365EmailSetupsIdAuthorizeEndpoint.py | 9 +- .../SystemOffice365EmailSetupsIdEndpoint.py | 50 +- ...e365EmailSetupsIdTestConnectionEndpoint.py | 9 +- .../manage/SystemOffice365Endpoint.py | 4 +- ...stemOnpremisesearchsettingCountEndpoint.py | 12 +- .../SystemOnpremisesearchsettingEndpoint.py | 17 +- .../SystemOnpremisesearchsettingIdEndpoint.py | 27 +- .../SystemOsgradeweightsCountEndpoint.py | 12 +- .../manage/SystemOsgradeweightsEndpoint.py | 20 +- .../manage/SystemOsgradeweightsIdEndpoint.py | 25 +- .../manage/SystemParsingTypesCountEndpoint.py | 12 +- .../manage/SystemParsingTypesEndpoint.py | 24 +- .../manage/SystemParsingTypesIdEndpoint.py | 12 +- .../SystemParsingVariablesCountEndpoint.py | 12 +- .../manage/SystemParsingVariablesEndpoint.py | 21 +- .../SystemParsingVariablesIdEndpoint.py | 9 +- .../SystemPortalReportsCountEndpoint.py | 12 +- .../manage/SystemPortalReportsEndpoint.py | 28 +- .../manage/SystemPortalReportsIdEndpoint.py | 34 +- .../SystemQuoteLinkSetupCountEndpoint.py | 12 +- .../manage/SystemQuoteLinkSetupEndpoint.py | 37 +- .../manage/SystemQuoteLinkSetupIdEndpoint.py | 37 +- ...temQuoteLinkSetupTestConnectionEndpoint.py | 9 +- .../manage/SystemReportCardsCountEndpoint.py | 12 +- .../manage/SystemReportCardsEndpoint.py | 40 +- ...SystemReportCardsIdDetailsCountEndpoint.py | 12 +- .../SystemReportCardsIdDetailsEndpoint.py | 27 +- .../SystemReportCardsIdDetailsIdEndpoint.py | 36 +- .../manage/SystemReportCardsIdEndpoint.py | 53 +- .../manage/SystemReportCardsIdInfoEndpoint.py | 9 +- .../SystemReportCardsInfoCountEndpoint.py | 12 +- .../manage/SystemReportCardsInfoEndpoint.py | 17 +- .../endpoints/manage/SystemReportsEndpoint.py | 16 +- .../manage/SystemReportsIdCountEndpoint.py | 12 +- .../manage/SystemReportsIdEndpoint.py | 25 +- ...temSecurityRolesIdSettingsCountEndpoint.py | 12 +- .../SystemSecurityRolesIdSettingsEndpoint.py | 23 +- ...SystemSecurityRolesIdSettingsIdEndpoint.py | 9 +- .../SystemSecurityrolesCountEndpoint.py | 12 +- .../manage/SystemSecurityrolesEndpoint.py | 4 +- .../manage/SystemSecurityrolesIdEndpoint.py | 4 +- .../SystemSecurityrolesIdInfoEndpoint.py | 9 +- .../SystemSecurityrolesInfoCountEndpoint.py | 12 +- .../manage/SystemSecurityrolesInfoEndpoint.py | 17 +- .../manage/SystemSettingsCountEndpoint.py | 12 +- .../manage/SystemSettingsEndpoint.py | 20 +- .../manage/SystemSettingsIdEndpoint.py | 25 +- .../manage/SystemSetupScreensCountEndpoint.py | 12 +- .../manage/SystemSetupScreensEndpoint.py | 24 +- .../manage/SystemSetupScreensIdEndpoint.py | 12 +- .../SystemSkillCategoriesCountEndpoint.py | 12 +- .../manage/SystemSkillCategoriesEndpoint.py | 29 +- .../manage/SystemSkillCategoriesIdEndpoint.py | 34 +- .../manage/SystemSkillsCountEndpoint.py | 12 +- .../endpoints/manage/SystemSkillsEndpoint.py | 36 +- .../manage/SystemSkillsIdEndpoint.py | 45 +- .../manage/SystemSkillsIdInfoEndpoint.py | 12 +- .../manage/SystemSkillsInfoCountEndpoint.py | 12 +- .../manage/SystemSkillsInfoEndpoint.py | 20 +- .../SystemSsoConfigurationsCountEndpoint.py | 12 +- .../manage/SystemSsoConfigurationsEndpoint.py | 30 +- .../SystemSsoConfigurationsIdEndpoint.py | 46 +- ...soConfigurationsIdRegistertokenEndpoint.py | 9 +- ...soConfigurationsIdSubmitmembersEndpoint.py | 9 +- .../manage/SystemSsoUsersCountEndpoint.py | 12 +- .../manage/SystemSsoUsersEndpoint.py | 24 +- .../manage/SystemSsoUsersIdEndpoint.py | 12 +- .../SystemStandardNotesCountEndpoint.py | 12 +- .../manage/SystemStandardNotesEndpoint.py | 28 +- .../manage/SystemStandardNotesIdEndpoint.py | 34 +- .../manage/SystemSurveysCountEndpoint.py | 12 +- .../endpoints/manage/SystemSurveysEndpoint.py | 40 +- .../manage/SystemSurveysIdCopyEndpoint.py | 8 +- .../manage/SystemSurveysIdEndpoint.py | 61 ++- .../manage/SystemSurveysIdInfoEndpoint.py | 12 +- .../SystemSurveysIdQuestionsCountEndpoint.py | 12 +- .../SystemSurveysIdQuestionsEndpoint.py | 30 +- .../SystemSurveysIdQuestionsIdEndpoint.py | 41 +- ...ystemSurveysIdQuestionsIdValuesEndpoint.py | 27 +- ...temSurveysIdQuestionsIdValuesIdEndpoint.py | 36 +- .../manage/SystemSurveysInfoCountEndpoint.py | 12 +- .../manage/SystemSurveysInfoEndpoint.py | 20 +- .../SystemTimeZoneSetupsCountEndpoint.py | 12 +- .../manage/SystemTimeZoneSetupsEndpoint.py | 37 +- .../manage/SystemTimeZoneSetupsIdEndpoint.py | 42 +- .../SystemTimeZoneSetupsIdInfoEndpoint.py | 9 +- .../SystemTimeZoneSetupsInfoCountEndpoint.py | 12 +- .../SystemTimeZoneSetupsInfoEndpoint.py | 17 +- .../SystemTodayPageCategoriesCountEndpoint.py | 12 +- .../SystemTodayPageCategoriesEndpoint.py | 30 +- .../SystemTodayPageCategoriesIdEndpoint.py | 36 +- .../SystemUserDefinedFieldsCountEndpoint.py | 12 +- .../manage/SystemUserDefinedFieldsEndpoint.py | 38 +- .../SystemUserDefinedFieldsIdEndpoint.py | 44 +- .../SystemUserDefinedFieldsIdInfoEndpoint.py | 9 +- ...ystemUserDefinedFieldsInfoCountEndpoint.py | 12 +- .../SystemUserDefinedFieldsInfoEndpoint.py | 14 +- ...ctionsIdAutomateParametersCountEndpoint.py | 12 +- ...flowActionsIdAutomateParametersEndpoint.py | 28 +- ...owActionsIdAutomateParametersIdEndpoint.py | 30 +- .../manage/SystemWorkflowactionsEndpoint.py | 4 +- .../manage/SystemWorkflowactionsIdEndpoint.py | 9 +- .../manage/SystemWorkflowsCountEndpoint.py | 12 +- .../manage/SystemWorkflowsEndpoint.py | 41 +- ...stemWorkflowsIdAttachmentsCountEndpoint.py | 12 +- .../SystemWorkflowsIdAttachmentsEndpoint.py | 22 +- .../SystemWorkflowsIdAttachmentsIdEndpoint.py | 9 +- .../manage/SystemWorkflowsIdCopyEndpoint.py | 8 +- .../manage/SystemWorkflowsIdEndpoint.py | 69 ++- .../SystemWorkflowsIdEventsCountEndpoint.py | 12 +- .../manage/SystemWorkflowsIdEventsEndpoint.py | 29 +- ...WorkflowsIdEventsIdActionsCountEndpoint.py | 12 +- ...ystemWorkflowsIdEventsIdActionsEndpoint.py | 32 +- ...temWorkflowsIdEventsIdActionsIdEndpoint.py | 36 +- .../SystemWorkflowsIdEventsIdCopyEndpoint.py | 9 +- .../SystemWorkflowsIdEventsIdEndpoint.py | 55 +- ...stemWorkflowsIdNotifyTypesCountEndpoint.py | 12 +- .../SystemWorkflowsIdNotifyTypesEndpoint.py | 33 +- .../SystemWorkflowsIdNotifyTypesIdEndpoint.py | 14 +- ...temWorkflowsIdNotifyTypesIdInfoEndpoint.py | 9 +- ...WorkflowsIdNotifyTypesInfoCountEndpoint.py | 12 +- ...ystemWorkflowsIdNotifyTypesInfoEndpoint.py | 14 +- .../SystemWorkflowsIdTriggersCountEndpoint.py | 12 +- .../SystemWorkflowsIdTriggersEndpoint.py | 21 +- .../SystemWorkflowsIdTriggersIdEndpoint.py | 5 +- ...rkflowsIdTriggersIdOptionsCountEndpoint.py | 12 +- ...temWorkflowsIdTriggersIdOptionsEndpoint.py | 18 +- .../SystemWorkflowsTableTypesCountEndpoint.py | 12 +- .../SystemWorkflowsTableTypesEndpoint.py | 29 +- .../SystemWorkflowsTableTypesIdEndpoint.py | 18 +- ...SystemWorkflowsTableTypesIdInfoEndpoint.py | 9 +- ...temWorkflowsTableTypesInfoCountEndpoint.py | 12 +- .../SystemWorkflowsTableTypesInfoEndpoint.py | 14 +- ...rkflowsUserdefinedfieldsActionsEndpoint.py | 9 +- ...flowsUserdefinedfieldsActionsIdEndpoint.py | 9 +- ...ystemWorkflowsUserdefinedfieldsEndpoint.py | 27 +- ...orkflowsUserdefinedfieldsEventsEndpoint.py | 9 +- ...serdefinedfieldsEventsIdActionsEndpoint.py | 9 +- ...rdefinedfieldsEventsIdActionsIdEndpoint.py | 7 +- ...kflowsUserdefinedfieldsEventsIdEndpoint.py | 16 +- ...temWorkflowsUserdefinedfieldsIdEndpoint.py | 14 +- .../manage/TimeAccrualsCountEndpoint.py | 12 +- .../endpoints/manage/TimeAccrualsEndpoint.py | 28 +- .../TimeAccrualsIdDetailsCountEndpoint.py | 12 +- .../manage/TimeAccrualsIdDetailsEndpoint.py | 21 +- .../manage/TimeAccrualsIdDetailsIdEndpoint.py | 36 +- .../manage/TimeAccrualsIdEndpoint.py | 45 +- .../TimeActivitystopwatchesCountEndpoint.py | 12 +- .../manage/TimeActivitystopwatchesEndpoint.py | 30 +- .../TimeActivitystopwatchesIdEndpoint.py | 36 +- .../manage/TimeChargeCodesCountEndpoint.py | 12 +- .../manage/TimeChargeCodesEndpoint.py | 40 +- .../manage/TimeChargeCodesIdEndpoint.py | 57 +- ...eChargeCodesIdExpenseTypesCountEndpoint.py | 12 +- .../TimeChargeCodesIdExpenseTypesEndpoint.py | 32 +- ...TimeChargeCodesIdExpenseTypesIdEndpoint.py | 36 +- .../manage/TimeChargeCodesIdInfoEndpoint.py | 9 +- .../manage/TimeChargeCodesIdUsagesEndpoint.py | 20 +- .../TimeChargeCodesIdUsagesListEndpoint.py | 12 +- .../TimeChargeCodesInfoCountEndpoint.py | 12 +- .../manage/TimeChargeCodesInfoEndpoint.py | 17 +- .../endpoints/manage/TimeEndpoint.py | 56 +- .../manage/TimeEntriesCountEndpoint.py | 12 +- .../manage/TimeEntriesDefaultsEndpoint.py | 8 +- .../endpoints/manage/TimeEntriesEndpoint.py | 36 +- .../TimeEntriesIdAuditsCountEndpoint.py | 12 +- .../manage/TimeEntriesIdAuditsEndpoint.py | 21 +- .../manage/TimeEntriesIdAuditsIdEndpoint.py | 9 +- .../endpoints/manage/TimeEntriesIdEndpoint.py | 45 +- ...InfoChargeCodeExpenseTypesCountEndpoint.py | 12 +- .../TimeInfoChargeCodeExpenseTypesEndpoint.py | 18 +- .../endpoints/manage/TimeInfoEndpoint.py | 4 +- .../TimeSchedulestopwatchesCountEndpoint.py | 12 +- .../manage/TimeSchedulestopwatchesEndpoint.py | 30 +- .../TimeSchedulestopwatchesIdEndpoint.py | 36 +- .../manage/TimeSheetsCountEndpoint.py | 12 +- .../endpoints/manage/TimeSheetsEndpoint.py | 20 +- .../manage/TimeSheetsIdApproveEndpoint.py | 9 +- .../manage/TimeSheetsIdAuditsCountEndpoint.py | 12 +- .../manage/TimeSheetsIdAuditsEndpoint.py | 21 +- .../manage/TimeSheetsIdAuditsIdEndpoint.py | 9 +- .../endpoints/manage/TimeSheetsIdEndpoint.py | 61 ++- .../manage/TimeSheetsIdRejectEndpoint.py | 9 +- .../manage/TimeSheetsIdReverseEndpoint.py | 9 +- .../manage/TimeSheetsIdSubmitEndpoint.py | 9 +- .../TimeTicketstopwatchesCountEndpoint.py | 12 +- .../manage/TimeTicketstopwatchesEndpoint.py | 30 +- .../manage/TimeTicketstopwatchesIdEndpoint.py | 36 +- .../TimeTimePeriodSetupsCountEndpoint.py | 12 +- .../TimeTimePeriodSetupsDefaultEndpoint.py | 9 +- .../manage/TimeTimePeriodSetupsEndpoint.py | 38 +- .../manage/TimeTimePeriodSetupsIdEndpoint.py | 40 +- ...eTimePeriodSetupsIdPeriodsCountEndpoint.py | 12 +- .../TimeTimePeriodSetupsIdPeriodsEndpoint.py | 26 +- ...TimeTimePeriodSetupsIdPeriodsIdEndpoint.py | 12 +- .../manage/TimeWorkRolesCountEndpoint.py | 12 +- .../endpoints/manage/TimeWorkRolesEndpoint.py | 40 +- .../manage/TimeWorkRolesIdEndpoint.py | 61 ++- .../manage/TimeWorkRolesIdInfoEndpoint.py | 8 +- .../TimeWorkRolesIdLocationsCountEndpoint.py | 12 +- .../TimeWorkRolesIdLocationsEndpoint.py | 30 +- .../TimeWorkRolesIdLocationsIdEndpoint.py | 36 +- .../manage/TimeWorkRolesIdUsagesEndpoint.py | 20 +- .../TimeWorkRolesIdUsagesListEndpoint.py | 12 +- .../manage/TimeWorkRolesInfoCountEndpoint.py | 12 +- .../manage/TimeWorkRolesInfoEndpoint.py | 16 +- .../manage/TimeWorkTypesCountEndpoint.py | 12 +- .../endpoints/manage/TimeWorkTypesEndpoint.py | 40 +- .../manage/TimeWorkTypesIdEndpoint.py | 53 +- .../manage/TimeWorkTypesIdInfoEndpoint.py | 8 +- .../manage/TimeWorkTypesIdUsagesEndpoint.py | 20 +- .../TimeWorkTypesIdUsagesListEndpoint.py | 12 +- .../manage/TimeWorkTypesInfoCountEndpoint.py | 12 +- 1952 files changed, 31438 insertions(+), 10852 deletions(-) diff --git a/src/pyconnectwise/clients/automate_client.py b/src/pyconnectwise/clients/automate_client.py index c872cbeaf..af8f34ba6 100644 --- a/src/pyconnectwise/clients/automate_client.py +++ b/src/pyconnectwise/clients/automate_client.py @@ -7,18 +7,26 @@ from pyconnectwise.endpoints.automate.CommandsEndpoint import CommandsEndpoint from pyconnectwise.endpoints.automate.ComputersEndpoint import ComputersEndpoint from pyconnectwise.endpoints.automate.ContactsEndpoint import ContactsEndpoint -from pyconnectwise.endpoints.automate.DataviewfoldersEndpoint import DataviewfoldersEndpoint +from pyconnectwise.endpoints.automate.DataviewfoldersEndpoint import ( + DataviewfoldersEndpoint, +) from pyconnectwise.endpoints.automate.DataviewsEndpoint import DataviewsEndpoint from pyconnectwise.endpoints.automate.DrivesEndpoint import DrivesEndpoint -from pyconnectwise.endpoints.automate.ExternalsystemcredentialsEndpoint import ExternalsystemcredentialsEndpoint +from pyconnectwise.endpoints.automate.ExternalsystemcredentialsEndpoint import ( + ExternalsystemcredentialsEndpoint, +) from pyconnectwise.endpoints.automate.GroupsEndpoint import GroupsEndpoint from pyconnectwise.endpoints.automate.LocationsEndpoint import LocationsEndpoint from pyconnectwise.endpoints.automate.LookupsEndpoint import LookupsEndpoint from pyconnectwise.endpoints.automate.MonitorsEndpoint import MonitorsEndpoint -from pyconnectwise.endpoints.automate.NetworkdevicesEndpoint import NetworkdevicesEndpoint +from pyconnectwise.endpoints.automate.NetworkdevicesEndpoint import ( + NetworkdevicesEndpoint, +) from pyconnectwise.endpoints.automate.PatchactionsEndpoint import PatchactionsEndpoint from pyconnectwise.endpoints.automate.PermissionsEndpoint import PermissionsEndpoint -from pyconnectwise.endpoints.automate.ProbeconfigurationEndpoint import ProbeconfigurationEndpoint +from pyconnectwise.endpoints.automate.ProbeconfigurationEndpoint import ( + ProbeconfigurationEndpoint, +) from pyconnectwise.endpoints.automate.ScriptfoldersEndpoint import ScriptfoldersEndpoint from pyconnectwise.endpoints.automate.ScriptingEndpoint import ScriptingEndpoint from pyconnectwise.endpoints.automate.ScriptsEndpoint import ScriptsEndpoint @@ -105,10 +113,15 @@ def _get_access_token(self) -> str: auth_response = requests.post( f"{self._get_url()}/apitoken", json={"UserName": self.username, "Password": self.password}, - headers={"Content-Type": "application/json", "ClientId": self.client_id}, + headers={ + "Content-Type": "application/json", + "ClientId": self.client_id, + }, ).json() token = auth_response["AccessToken"] - self.token_expiry_time = datetime.fromisoformat(auth_response["ExpirationDate"]) + self.token_expiry_time = datetime.fromisoformat( + auth_response["ExpirationDate"] + ) except Exception as e: print(e) return token diff --git a/src/pyconnectwise/clients/manage_client.py b/src/pyconnectwise/clients/manage_client.py index e320f726a..8b485f6da 100644 --- a/src/pyconnectwise/clients/manage_client.py +++ b/src/pyconnectwise/clients/manage_client.py @@ -85,7 +85,9 @@ def _get_url(self) -> str: """ return f"https://{self.manage_url}/{self.codebase.strip('/')}/apis/3.0" - def _try_get_codebase_from_api(self, manage_url: str, company_name: str, headers: dict[str, str]) -> str | None: + def _try_get_codebase_from_api( + self, manage_url: str, company_name: str, headers: dict[str, str] + ) -> str | None: """ Tries to retrieve the codebase from the API using the provided company url, company name and headers. @@ -100,7 +102,9 @@ def _try_get_codebase_from_api(self, manage_url: str, company_name: str, headers result = "" try: url = f"https://{manage_url}/login/companyinfo/{company_name}" - result = requests.request("GET", url, headers=headers).json().get("Codebase") + result = ( + requests.request("GET", url, headers=headers).json().get("Codebase") + ) except: result = None return result diff --git a/src/pyconnectwise/endpoints/automate/ApitokenEndpoint.py b/src/pyconnectwise/endpoints/automate/ApitokenEndpoint.py index fe739ba7f..a9d5d4e1b 100644 --- a/src/pyconnectwise/endpoints/automate/ApitokenEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ApitokenEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Security import AuthInformation +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Security import ( + AuthInformation, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class ApitokenEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Apitoken", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AuthInformation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AuthInformation: """ Performs a GET request against the /Apitoken endpoint. @@ -20,9 +24,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AuthInformation: The parsed response data. """ - return self._parse_one(AuthInformation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AuthInformation, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TokenResult: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TokenResult: """ Performs a POST request against the /Apitoken endpoint. @@ -32,4 +41,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TokenResult: The parsed response data. """ - return self._parse_one(TokenResult, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TokenResult, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/AvtemplatepoliciesEndpoint.py b/src/pyconnectwise/endpoints/automate/AvtemplatepoliciesEndpoint.py index c6622881d..a0b10c6cd 100644 --- a/src/pyconnectwise/endpoints/automate/AvtemplatepoliciesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/AvtemplatepoliciesEndpoint.py @@ -10,7 +10,9 @@ class AvtemplatepoliciesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Avtemplatepolicies", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AVTemplatePolicy: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AVTemplatePolicy: """ Performs a POST request against the /Avtemplatepolicies endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AVTemplatePolicy: The parsed response data. """ - return self._parse_one(AVTemplatePolicy, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AVTemplatePolicy, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/AvtemplatepolicydataEndpoint.py b/src/pyconnectwise/endpoints/automate/AvtemplatepolicydataEndpoint.py index f3d9499cc..ba97244ff 100644 --- a/src/pyconnectwise/endpoints/automate/AvtemplatepolicydataEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/AvtemplatepolicydataEndpoint.py @@ -8,9 +8,13 @@ class AvtemplatepolicydataEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Avtemplatepolicydata", parent_endpoint=parent_endpoint) + super().__init__( + client, "Avtemplatepolicydata", parent_endpoint=parent_endpoint + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AVTemplatePolicyData: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AVTemplatePolicyData: """ Performs a POST request against the /Avtemplatepolicydata endpoint. @@ -20,4 +24,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AVTemplatePolicyData: The parsed response data. """ - return self._parse_one(AVTemplatePolicyData, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AVTemplatePolicyData, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ClientsEndpoint.py b/src/pyconnectwise/endpoints/automate/ClientsEndpoint.py index b2efcb899..60f4c5bbf 100644 --- a/src/pyconnectwise/endpoints/automate/ClientsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ClientsEndpoint.py @@ -24,7 +24,9 @@ def id(self, id: int) -> ClientsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Client]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Client]: """ Performs a GET request against the /Clients endpoint and returns an initialized PaginatedResponse object. @@ -45,7 +47,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Client]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Client]: """ Performs a GET request against the /Clients endpoint. @@ -55,9 +59,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Client]: The parsed response data. """ - return self._parse_many(Client, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Client, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Client: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Client: """ Performs a POST request against the /Clients endpoint. @@ -67,4 +75,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Client: The parsed response data. """ - return self._parse_one(Client, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Client, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ClientsIdDocumentsEndpoint.py b/src/pyconnectwise/endpoints/automate/ClientsIdDocumentsEndpoint.py index 9fbf36ea1..da550ac27 100644 --- a/src/pyconnectwise/endpoints/automate/ClientsIdDocumentsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ClientsIdDocumentsEndpoint.py @@ -10,7 +10,9 @@ class ClientsIdDocumentsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Documents", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Document]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Document]: """ Performs a GET request against the /Clients/{id}/Documents endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Document]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Document]: """ Performs a GET request against the /Clients/{id}/Documents endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Document]: The parsed response data. """ - return self._parse_many(Document, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Document, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ClientsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ClientsIdEndpoint.py index a9aaae841..31f055366 100644 --- a/src/pyconnectwise/endpoints/automate/ClientsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ClientsIdEndpoint.py @@ -1,9 +1,17 @@ from typing import Any -from pyconnectwise.endpoints.automate.ClientsIdDocumentsEndpoint import ClientsIdDocumentsEndpoint -from pyconnectwise.endpoints.automate.ClientsIdLicensesEndpoint import ClientsIdLicensesEndpoint -from pyconnectwise.endpoints.automate.ClientsIdPermissionsEndpoint import ClientsIdPermissionsEndpoint -from pyconnectwise.endpoints.automate.ClientsIdProductkeysEndpoint import ClientsIdProductkeysEndpoint +from pyconnectwise.endpoints.automate.ClientsIdDocumentsEndpoint import ( + ClientsIdDocumentsEndpoint, +) +from pyconnectwise.endpoints.automate.ClientsIdLicensesEndpoint import ( + ClientsIdLicensesEndpoint, +) +from pyconnectwise.endpoints.automate.ClientsIdPermissionsEndpoint import ( + ClientsIdPermissionsEndpoint, +) +from pyconnectwise.endpoints.automate.ClientsIdProductkeysEndpoint import ( + ClientsIdProductkeysEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.LabTech.Models import Client from pyconnectwise.models.base.message_model import GenericMessageModel @@ -14,12 +22,22 @@ class ClientsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.licenses = self._register_child_endpoint(ClientsIdLicensesEndpoint(client, parent_endpoint=self)) - self.permissions = self._register_child_endpoint(ClientsIdPermissionsEndpoint(client, parent_endpoint=self)) - self.documents = self._register_child_endpoint(ClientsIdDocumentsEndpoint(client, parent_endpoint=self)) - self.productkeys = self._register_child_endpoint(ClientsIdProductkeysEndpoint(client, parent_endpoint=self)) + self.licenses = self._register_child_endpoint( + ClientsIdLicensesEndpoint(client, parent_endpoint=self) + ) + self.permissions = self._register_child_endpoint( + ClientsIdPermissionsEndpoint(client, parent_endpoint=self) + ) + self.documents = self._register_child_endpoint( + ClientsIdDocumentsEndpoint(client, parent_endpoint=self) + ) + self.productkeys = self._register_child_endpoint( + ClientsIdProductkeysEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Client]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Client]: """ Performs a GET request against the /Clients/{id} endpoint and returns an initialized PaginatedResponse object. @@ -40,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Client: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Client: """ Performs a GET request against the /Clients/{id} endpoint. @@ -50,4 +70,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Client: The parsed response data. """ - return self._parse_one(Client, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Client, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ClientsIdLicensesEndpoint.py b/src/pyconnectwise/endpoints/automate/ClientsIdLicensesEndpoint.py index 9142b81c6..abd5f269b 100644 --- a/src/pyconnectwise/endpoints/automate/ClientsIdLicensesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ClientsIdLicensesEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagedLicense]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagedLicense]: """ Performs a GET request against the /Clients/{id}/Licenses endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ManagedLicense]: The parsed response data. """ - return self._parse_many(ManagedLicense, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ManagedLicense, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedLicense: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedLicense: """ Performs a POST request against the /Clients/{id}/Licenses endpoint. @@ -55,4 +62,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ManagedLicense: The parsed response data. """ - return self._parse_one(ManagedLicense, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ManagedLicense, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ClientsIdPermissionsEndpoint.py b/src/pyconnectwise/endpoints/automate/ClientsIdPermissionsEndpoint.py index 6976862c1..c370044a4 100644 --- a/src/pyconnectwise/endpoints/automate/ClientsIdPermissionsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ClientsIdPermissionsEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ClientsIdPermissionsIdEndpoint import ClientsIdPermissionsIdEndpoint +from pyconnectwise.endpoints.automate.ClientsIdPermissionsIdEndpoint import ( + ClientsIdPermissionsIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/automate/ClientsIdPermissionsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ClientsIdPermissionsIdEndpoint.py index eb7251e31..a6e13c04b 100644 --- a/src/pyconnectwise/endpoints/automate/ClientsIdPermissionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ClientsIdPermissionsIdEndpoint.py @@ -9,7 +9,9 @@ class ClientsIdPermissionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /Clients/{id}/Permissions/{id} endpoint. @@ -19,4 +21,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ClientsIdProductkeysEndpoint.py b/src/pyconnectwise/endpoints/automate/ClientsIdProductkeysEndpoint.py index 51a09cdc1..58785e753 100644 --- a/src/pyconnectwise/endpoints/automate/ClientsIdProductkeysEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ClientsIdProductkeysEndpoint.py @@ -10,7 +10,9 @@ class ClientsIdProductkeysEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Productkeys", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProductKey]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProductKey]: """ Performs a GET request against the /Clients/{id}/Productkeys endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductKey]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductKey]: """ Performs a GET request against the /Clients/{id}/Productkeys endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductKey]: The parsed response data. """ - return self._parse_many(ProductKey, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProductKey, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductKey: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductKey: """ Performs a POST request against the /Clients/{id}/Productkeys endpoint. @@ -53,4 +61,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProductKey: The parsed response data. """ - return self._parse_one(ProductKey, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProductKey, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/CommandsEndpoint.py b/src/pyconnectwise/endpoints/automate/CommandsEndpoint.py index 311d6a627..36a9534c7 100644 --- a/src/pyconnectwise/endpoints/automate/CommandsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/CommandsEndpoint.py @@ -24,7 +24,9 @@ def id(self, id: int) -> CommandsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Command]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Command]: """ Performs a GET request against the /Commands endpoint and returns an initialized PaginatedResponse object. @@ -45,7 +47,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Command]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Command]: """ Performs a GET request against the /Commands endpoint. @@ -55,4 +59,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Command]: The parsed response data. """ - return self._parse_many(Command, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Command, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/CommandsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/CommandsIdEndpoint.py index bd7fd0ebb..7b40f7429 100644 --- a/src/pyconnectwise/endpoints/automate/CommandsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/CommandsIdEndpoint.py @@ -10,7 +10,9 @@ class CommandsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Command]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Command]: """ Performs a GET request against the /Commands/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Command: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Command: """ Performs a GET request against the /Commands/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Command: The parsed response data. """ - return self._parse_one(Command, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Command, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputermenusEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputermenusEndpoint.py index aee2d9616..076ea2b45 100644 --- a/src/pyconnectwise/endpoints/automate/ComputermenusEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputermenusEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerMenu]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerMenu]: """ Performs a GET request against the /Computermenus endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerMenu]: The parsed response data. """ - return self._parse_many(ComputerMenu, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerMenu, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ComputerMenu: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ComputerMenu: """ Performs a POST request against the /Computermenus endpoint. @@ -55,4 +61,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ComputerMenu: The parsed response data. """ - return self._parse_one(ComputerMenu, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ComputerMenu, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersChassisEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersChassisEndpoint.py index 8f5d20f99..c2f37a063 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersChassisEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersChassisEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerChassis]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerChassis]: """ Performs a GET request against the /Computers/Chassis endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerChassis]: The parsed response data. """ - return self._parse_many(ComputerChassis, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerChassis, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersDrivesEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersDrivesEndpoint.py index b3eea194b..f8bc3159b 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersDrivesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersDrivesEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerDrive]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerDrive]: """ Performs a GET request against the /Computers/Drives endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerDrive]: The parsed response data. """ - return self._parse_many(ComputerDrive, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerDrive, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersEndpoint.py index 109af45cf..d3d94d3df 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersEndpoint.py @@ -1,11 +1,21 @@ from typing import Any -from pyconnectwise.endpoints.automate.ComputersChassisEndpoint import ComputersChassisEndpoint -from pyconnectwise.endpoints.automate.ComputersDrivesEndpoint import ComputersDrivesEndpoint +from pyconnectwise.endpoints.automate.ComputersChassisEndpoint import ( + ComputersChassisEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersDrivesEndpoint import ( + ComputersDrivesEndpoint, +) from pyconnectwise.endpoints.automate.ComputersIdEndpoint import ComputersIdEndpoint -from pyconnectwise.endpoints.automate.ComputersMaintenancemodesEndpoint import ComputersMaintenancemodesEndpoint -from pyconnectwise.endpoints.automate.ComputersMemoryslotsEndpoint import ComputersMemoryslotsEndpoint -from pyconnectwise.endpoints.automate.ComputersSoftwareEndpoint import ComputersSoftwareEndpoint +from pyconnectwise.endpoints.automate.ComputersMaintenancemodesEndpoint import ( + ComputersMaintenancemodesEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersMemoryslotsEndpoint import ( + ComputersMemoryslotsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersSoftwareEndpoint import ( + ComputersSoftwareEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.LabTech.Models import Computer from pyconnectwise.models.base.message_model import GenericMessageModel @@ -16,13 +26,21 @@ class ComputersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Computers", parent_endpoint=parent_endpoint) - self.memoryslots = self._register_child_endpoint(ComputersMemoryslotsEndpoint(client, parent_endpoint=self)) - self.software = self._register_child_endpoint(ComputersSoftwareEndpoint(client, parent_endpoint=self)) - self.chassis = self._register_child_endpoint(ComputersChassisEndpoint(client, parent_endpoint=self)) - self.drives = self._register_child_endpoint(ComputersDrivesEndpoint(client, parent_endpoint=self)) self.maintenancemodes = self._register_child_endpoint( ComputersMaintenancemodesEndpoint(client, parent_endpoint=self) ) + self.software = self._register_child_endpoint( + ComputersSoftwareEndpoint(client, parent_endpoint=self) + ) + self.chassis = self._register_child_endpoint( + ComputersChassisEndpoint(client, parent_endpoint=self) + ) + self.memoryslots = self._register_child_endpoint( + ComputersMemoryslotsEndpoint(client, parent_endpoint=self) + ) + self.drives = self._register_child_endpoint( + ComputersDrivesEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ComputersIdEndpoint: """ @@ -37,7 +55,9 @@ def id(self, id: int) -> ComputersIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Computer]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Computer]: """ Performs a GET request against the /Computers endpoint and returns an initialized PaginatedResponse object. @@ -58,7 +78,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Computer]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Computer]: """ Performs a GET request against the /Computers endpoint. @@ -68,4 +90,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Computer]: The parsed response data. """ - return self._parse_many(Computer, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Computer, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdAlertsuspensionsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdAlertsuspensionsEndpoint.py index 7b099ebaf..16e9f1ee5 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdAlertsuspensionsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdAlertsuspensionsEndpoint.py @@ -1,9 +1,11 @@ from typing import Any -from pyconnectwise.endpoints.automate.ComputersIdAlertsuspensionsMaintenancewindowEndpoint import \ - ComputersIdAlertsuspensionsMaintenancewindowEndpoint -from pyconnectwise.endpoints.automate.ComputersIdAlertsuspensionsTemplatediversionEndpoint import \ - ComputersIdAlertsuspensionsTemplatediversionEndpoint +from pyconnectwise.endpoints.automate.ComputersIdAlertsuspensionsMaintenancewindowEndpoint import ( + ComputersIdAlertsuspensionsMaintenancewindowEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdAlertsuspensionsTemplatediversionEndpoint import ( + ComputersIdAlertsuspensionsTemplatediversionEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,9 +15,13 @@ class ComputersIdAlertsuspensionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Alertsuspensions", parent_endpoint=parent_endpoint) - self.maintenancewindow = self._register_child_endpoint( - ComputersIdAlertsuspensionsMaintenancewindowEndpoint(client, parent_endpoint=self) - ) self.templatediversion = self._register_child_endpoint( - ComputersIdAlertsuspensionsTemplatediversionEndpoint(client, parent_endpoint=self) + ComputersIdAlertsuspensionsTemplatediversionEndpoint( + client, parent_endpoint=self + ) + ) + self.maintenancewindow = self._register_child_endpoint( + ComputersIdAlertsuspensionsMaintenancewindowEndpoint( + client, parent_endpoint=self + ) ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdBiosEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdBiosEndpoint.py index 0da3e0784..21ee2ba0c 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdBiosEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdBiosEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ComputerBios: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ComputerBios: """ Performs a GET request against the /Computers/{id}/Bios endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ComputerBios: The parsed response data. """ - return self._parse_one(ComputerBios, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ComputerBios, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdCommandexecuteEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdCommandexecuteEndpoint.py index c3eabe52a..6d2f3a4dc 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdCommandexecuteEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdCommandexecuteEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CommandExecute]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CommandExecute]: """ Performs a GET request against the /Computers/{id}/Commandexecute endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CommandExecute]: The parsed response data. """ - return self._parse_many(CommandExecute, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CommandExecute, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CommandExecute: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CommandExecute: """ Performs a POST request against the /Computers/{id}/Commandexecute endpoint. @@ -55,4 +62,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CommandExecute: The parsed response data. """ - return self._parse_one(CommandExecute, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CommandExecute, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdCommandhistoryEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdCommandhistoryEndpoint.py index 6f822d031..4910a54c6 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdCommandhistoryEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdCommandhistoryEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Compatibility import CommandHistory +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Compatibility import ( + CommandHistory, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CommandHistory]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CommandHistory]: """ Performs a GET request against the /Computers/{id}/Commandhistory endpoint. @@ -43,4 +47,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CommandHistory]: The parsed response data. """ - return self._parse_many(CommandHistory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CommandHistory, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdComputerpatchingpoliciesEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdComputerpatchingpoliciesEndpoint.py index 820983bff..46bbb8608 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdComputerpatchingpoliciesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdComputerpatchingpoliciesEndpoint.py @@ -8,7 +8,9 @@ class ComputersIdComputerpatchingpoliciesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Computerpatchingpolicies", parent_endpoint=parent_endpoint) + super().__init__( + client, "Computerpatchingpolicies", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerPatchingPolicy]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerPatchingPolicy]: """ Performs a GET request against the /Computers/{id}/Computerpatchingpolicies endpoint. @@ -43,4 +47,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerPatchingPolicy]: The parsed response data. """ - return self._parse_many(ComputerPatchingPolicy, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerPatchingPolicy, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdDevicesEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdDevicesEndpoint.py index 452dd48e0..445c793a3 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdDevicesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdDevicesEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerDevice]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerDevice]: """ Performs a GET request against the /Computers/{id}/Devices endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerDevice]: The parsed response data. """ - return self._parse_many(ComputerDevice, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerDevice, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdDriversEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdDriversEndpoint.py index 742b276dc..2449f3c98 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdDriversEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdDriversEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ComputerDriver +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ( + ComputerDriver, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerDriver]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerDriver]: """ Performs a GET request against the /Computers/{id}/Drivers endpoint. @@ -43,4 +47,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerDriver]: The parsed response data. """ - return self._parse_many(ComputerDriver, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerDriver, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdDrivesEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdDrivesEndpoint.py index 6d1b76921..2c9175341 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdDrivesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdDrivesEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ComputersIdDrivesIdEndpoint import ComputersIdDrivesIdEndpoint +from pyconnectwise.endpoints.automate.ComputersIdDrivesIdEndpoint import ( + ComputersIdDrivesIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdDrivesIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdDrivesIdEndpoint.py index 187eef7a4..87ef74dd8 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdDrivesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdDrivesIdEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ComputersIdDrivesIdSmartdataEndpoint import ComputersIdDrivesIdSmartdataEndpoint +from pyconnectwise.endpoints.automate.ComputersIdDrivesIdSmartdataEndpoint import ( + ComputersIdDrivesIdSmartdataEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdDrivesIdSmartdataEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdDrivesIdSmartdataEndpoint.py index 6f8aa2c50..715f32f4a 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdDrivesIdSmartdataEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdDrivesIdSmartdataEndpoint.py @@ -10,7 +10,9 @@ class ComputersIdDrivesIdSmartdataEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Smartdata", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SmartData]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SmartData]: """ Performs a GET request against the /Computers/{id}/Drives/{id}/Smartdata endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SmartData]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SmartData]: """ Performs a GET request against the /Computers/{id}/Drives/{id}/Smartdata endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SmartData]: The parsed response data. """ - return self._parse_many(SmartData, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SmartData, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdEffectivepatchingpolicyEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdEffectivepatchingpolicyEndpoint.py index ed1511120..2d69d6972 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdEffectivepatchingpolicyEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdEffectivepatchingpolicyEndpoint.py @@ -8,7 +8,9 @@ class ComputersIdEffectivepatchingpolicyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Effectivepatchingpolicy", parent_endpoint=parent_endpoint) + super().__init__( + client, "Effectivepatchingpolicy", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ComputerEffectivePatchingPolicy: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ComputerEffectivePatchingPolicy: """ Performs a GET request against the /Computers/{id}/Effectivepatchingpolicy endpoint. @@ -44,5 +48,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C ComputerEffectivePatchingPolicy: The parsed response data. """ return self._parse_one( - ComputerEffectivePatchingPolicy, super()._make_request("GET", data=data, params=params).json() + ComputerEffectivePatchingPolicy, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdEndpoint.py index 3ad9a726e..eed4b001d 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdEndpoint.py @@ -1,37 +1,92 @@ from typing import Any -from pyconnectwise.endpoints.automate.ComputersIdAlertsEndpoint import ComputersIdAlertsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdAlertsuspensionsEndpoint import ComputersIdAlertsuspensionsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdBiosEndpoint import ComputersIdBiosEndpoint -from pyconnectwise.endpoints.automate.ComputersIdCommandexecuteEndpoint import ComputersIdCommandexecuteEndpoint -from pyconnectwise.endpoints.automate.ComputersIdCommandhistoryEndpoint import ComputersIdCommandhistoryEndpoint -from pyconnectwise.endpoints.automate.ComputersIdComputerpatchingpoliciesEndpoint import \ - ComputersIdComputerpatchingpoliciesEndpoint -from pyconnectwise.endpoints.automate.ComputersIdDevicesEndpoint import ComputersIdDevicesEndpoint -from pyconnectwise.endpoints.automate.ComputersIdDriversEndpoint import ComputersIdDriversEndpoint -from pyconnectwise.endpoints.automate.ComputersIdDrivesEndpoint import ComputersIdDrivesEndpoint -from pyconnectwise.endpoints.automate.ComputersIdEffectivepatchingpolicyEndpoint import \ - ComputersIdEffectivepatchingpolicyEndpoint -from pyconnectwise.endpoints.automate.ComputersIdMicrosoftupdatesEndpoint import ComputersIdMicrosoftupdatesEndpoint -from pyconnectwise.endpoints.automate.ComputersIdMonitoralertsuspensionsEndpoint import \ - ComputersIdMonitoralertsuspensionsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdMonitorsEndpoint import ComputersIdMonitorsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdOperatingsystemEndpoint import ComputersIdOperatingsystemEndpoint -from pyconnectwise.endpoints.automate.ComputersIdPatchingstatsEndpoint import ComputersIdPatchingstatsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdPatchjobsEndpoint import ComputersIdPatchjobsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdPrintersEndpoint import ComputersIdPrintersEndpoint -from pyconnectwise.endpoints.automate.ComputersIdProcessorsEndpoint import ComputersIdProcessorsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdRunningscriptsEndpoint import ComputersIdRunningscriptsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdScheduledscriptsEndpoint import ComputersIdScheduledscriptsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdScheduledtasksEndpoint import ComputersIdScheduledtasksEndpoint -from pyconnectwise.endpoints.automate.ComputersIdScripthistoryEndpoint import ComputersIdScripthistoryEndpoint -from pyconnectwise.endpoints.automate.ComputersIdSensorsEndpoint import ComputersIdSensorsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdServicesEndpoint import ComputersIdServicesEndpoint -from pyconnectwise.endpoints.automate.ComputersIdSoftwareEndpoint import ComputersIdSoftwareEndpoint -from pyconnectwise.endpoints.automate.ComputersIdSystemslotsEndpoint import ComputersIdSystemslotsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdThirdpartypatchesEndpoint import ComputersIdThirdpartypatchesEndpoint -from pyconnectwise.endpoints.automate.ComputersIdUpsEndpoint import ComputersIdUpsEndpoint -from pyconnectwise.endpoints.automate.ComputersIdVideocardsEndpoint import ComputersIdVideocardsEndpoint +from pyconnectwise.endpoints.automate.ComputersIdAlertsEndpoint import ( + ComputersIdAlertsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdAlertsuspensionsEndpoint import ( + ComputersIdAlertsuspensionsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdBiosEndpoint import ( + ComputersIdBiosEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdCommandexecuteEndpoint import ( + ComputersIdCommandexecuteEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdCommandhistoryEndpoint import ( + ComputersIdCommandhistoryEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdComputerpatchingpoliciesEndpoint import ( + ComputersIdComputerpatchingpoliciesEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdDevicesEndpoint import ( + ComputersIdDevicesEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdDriversEndpoint import ( + ComputersIdDriversEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdDrivesEndpoint import ( + ComputersIdDrivesEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdEffectivepatchingpolicyEndpoint import ( + ComputersIdEffectivepatchingpolicyEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdMicrosoftupdatesEndpoint import ( + ComputersIdMicrosoftupdatesEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdMonitoralertsuspensionsEndpoint import ( + ComputersIdMonitoralertsuspensionsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdMonitorsEndpoint import ( + ComputersIdMonitorsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdOperatingsystemEndpoint import ( + ComputersIdOperatingsystemEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdPatchingstatsEndpoint import ( + ComputersIdPatchingstatsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdPatchjobsEndpoint import ( + ComputersIdPatchjobsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdPrintersEndpoint import ( + ComputersIdPrintersEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdProcessorsEndpoint import ( + ComputersIdProcessorsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdRunningscriptsEndpoint import ( + ComputersIdRunningscriptsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdScheduledscriptsEndpoint import ( + ComputersIdScheduledscriptsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdScheduledtasksEndpoint import ( + ComputersIdScheduledtasksEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdScripthistoryEndpoint import ( + ComputersIdScripthistoryEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdSensorsEndpoint import ( + ComputersIdSensorsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdServicesEndpoint import ( + ComputersIdServicesEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdSoftwareEndpoint import ( + ComputersIdSoftwareEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdSystemslotsEndpoint import ( + ComputersIdSystemslotsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdThirdpartypatchesEndpoint import ( + ComputersIdThirdpartypatchesEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdUpsEndpoint import ( + ComputersIdUpsEndpoint, +) +from pyconnectwise.endpoints.automate.ComputersIdVideocardsEndpoint import ( + ComputersIdVideocardsEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.LabTech.Models import Computer from pyconnectwise.models.base.message_model import GenericMessageModel @@ -42,65 +97,97 @@ class ComputersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.scheduledscripts = self._register_child_endpoint( - ComputersIdScheduledscriptsEndpoint(client, parent_endpoint=self) + self.commandexecute = self._register_child_endpoint( + ComputersIdCommandexecuteEndpoint(client, parent_endpoint=self) + ) + self.processors = self._register_child_endpoint( + ComputersIdProcessorsEndpoint(client, parent_endpoint=self) + ) + self.devices = self._register_child_endpoint( + ComputersIdDevicesEndpoint(client, parent_endpoint=self) + ) + self.drives = self._register_child_endpoint( + ComputersIdDrivesEndpoint(client, parent_endpoint=self) + ) + self.alerts = self._register_child_endpoint( + ComputersIdAlertsEndpoint(client, parent_endpoint=self) ) self.commandhistory = self._register_child_endpoint( ComputersIdCommandhistoryEndpoint(client, parent_endpoint=self) ) - self.monitoralertsuspensions = self._register_child_endpoint( - ComputersIdMonitoralertsuspensionsEndpoint(client, parent_endpoint=self) - ) - self.processors = self._register_child_endpoint(ComputersIdProcessorsEndpoint(client, parent_endpoint=self)) - self.scripthistory = self._register_child_endpoint( - ComputersIdScripthistoryEndpoint(client, parent_endpoint=self) + self.drivers = self._register_child_endpoint( + ComputersIdDriversEndpoint(client, parent_endpoint=self) ) - self.commandexecute = self._register_child_endpoint( - ComputersIdCommandexecuteEndpoint(client, parent_endpoint=self) + self.effectivepatchingpolicy = self._register_child_endpoint( + ComputersIdEffectivepatchingpolicyEndpoint(client, parent_endpoint=self) ) self.thirdpartypatches = self._register_child_endpoint( ComputersIdThirdpartypatchesEndpoint(client, parent_endpoint=self) ) - self.effectivepatchingpolicy = self._register_child_endpoint( - ComputersIdEffectivepatchingpolicyEndpoint(client, parent_endpoint=self) + self.patchjobs = self._register_child_endpoint( + ComputersIdPatchjobsEndpoint(client, parent_endpoint=self) ) self.patchingstats = self._register_child_endpoint( ComputersIdPatchingstatsEndpoint(client, parent_endpoint=self) ) - self.operatingsystem = self._register_child_endpoint( - ComputersIdOperatingsystemEndpoint(client, parent_endpoint=self) - ) - self.systemslots = self._register_child_endpoint(ComputersIdSystemslotsEndpoint(client, parent_endpoint=self)) self.alertsuspensions = self._register_child_endpoint( ComputersIdAlertsuspensionsEndpoint(client, parent_endpoint=self) ) + self.scheduledtasks = self._register_child_endpoint( + ComputersIdScheduledtasksEndpoint(client, parent_endpoint=self) + ) + self.monitors = self._register_child_endpoint( + ComputersIdMonitorsEndpoint(client, parent_endpoint=self) + ) + self.videocards = self._register_child_endpoint( + ComputersIdVideocardsEndpoint(client, parent_endpoint=self) + ) + self.scripthistory = self._register_child_endpoint( + ComputersIdScripthistoryEndpoint(client, parent_endpoint=self) + ) + self.bios = self._register_child_endpoint( + ComputersIdBiosEndpoint(client, parent_endpoint=self) + ) + self.systemslots = self._register_child_endpoint( + ComputersIdSystemslotsEndpoint(client, parent_endpoint=self) + ) + self.software = self._register_child_endpoint( + ComputersIdSoftwareEndpoint(client, parent_endpoint=self) + ) + self.monitoralertsuspensions = self._register_child_endpoint( + ComputersIdMonitoralertsuspensionsEndpoint(client, parent_endpoint=self) + ) + self.services = self._register_child_endpoint( + ComputersIdServicesEndpoint(client, parent_endpoint=self) + ) + self.scheduledscripts = self._register_child_endpoint( + ComputersIdScheduledscriptsEndpoint(client, parent_endpoint=self) + ) + self.ups = self._register_child_endpoint( + ComputersIdUpsEndpoint(client, parent_endpoint=self) + ) self.microsoftupdates = self._register_child_endpoint( ComputersIdMicrosoftupdatesEndpoint(client, parent_endpoint=self) ) - self.patchjobs = self._register_child_endpoint(ComputersIdPatchjobsEndpoint(client, parent_endpoint=self)) - self.sensors = self._register_child_endpoint(ComputersIdSensorsEndpoint(client, parent_endpoint=self)) - self.ups = self._register_child_endpoint(ComputersIdUpsEndpoint(client, parent_endpoint=self)) - self.alerts = self._register_child_endpoint(ComputersIdAlertsEndpoint(client, parent_endpoint=self)) - self.videocards = self._register_child_endpoint(ComputersIdVideocardsEndpoint(client, parent_endpoint=self)) - self.services = self._register_child_endpoint(ComputersIdServicesEndpoint(client, parent_endpoint=self)) - self.runningscripts = self._register_child_endpoint( - ComputersIdRunningscriptsEndpoint(client, parent_endpoint=self) + self.sensors = self._register_child_endpoint( + ComputersIdSensorsEndpoint(client, parent_endpoint=self) + ) + self.operatingsystem = self._register_child_endpoint( + ComputersIdOperatingsystemEndpoint(client, parent_endpoint=self) + ) + self.printers = self._register_child_endpoint( + ComputersIdPrintersEndpoint(client, parent_endpoint=self) ) - self.drives = self._register_child_endpoint(ComputersIdDrivesEndpoint(client, parent_endpoint=self)) self.computerpatchingpolicies = self._register_child_endpoint( ComputersIdComputerpatchingpoliciesEndpoint(client, parent_endpoint=self) ) - self.printers = self._register_child_endpoint(ComputersIdPrintersEndpoint(client, parent_endpoint=self)) - self.software = self._register_child_endpoint(ComputersIdSoftwareEndpoint(client, parent_endpoint=self)) - self.scheduledtasks = self._register_child_endpoint( - ComputersIdScheduledtasksEndpoint(client, parent_endpoint=self) + self.runningscripts = self._register_child_endpoint( + ComputersIdRunningscriptsEndpoint(client, parent_endpoint=self) ) - self.monitors = self._register_child_endpoint(ComputersIdMonitorsEndpoint(client, parent_endpoint=self)) - self.drivers = self._register_child_endpoint(ComputersIdDriversEndpoint(client, parent_endpoint=self)) - self.devices = self._register_child_endpoint(ComputersIdDevicesEndpoint(client, parent_endpoint=self)) - self.bios = self._register_child_endpoint(ComputersIdBiosEndpoint(client, parent_endpoint=self)) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Computer]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Computer]: """ Performs a GET request against the /Computers/{id} endpoint and returns an initialized PaginatedResponse object. @@ -121,7 +208,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Computer: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Computer: """ Performs a GET request against the /Computers/{id} endpoint. @@ -131,4 +220,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Computer: The parsed response data. """ - return self._parse_one(Computer, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Computer, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdMonitoralertsuspensionsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdMonitoralertsuspensionsEndpoint.py index d19e61ad8..1b123a2b4 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdMonitoralertsuspensionsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdMonitoralertsuspensionsEndpoint.py @@ -1,16 +1,22 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.Alerting import MonitorAlertSuspension +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.Alerting import ( + MonitorAlertSuspension, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class ComputersIdMonitoralertsuspensionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Monitoralertsuspensions", parent_endpoint=parent_endpoint) + super().__init__( + client, "Monitoralertsuspensions", parent_endpoint=parent_endpoint + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MonitorAlertSuspension: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MonitorAlertSuspension: """ Performs a POST request against the /Computers/{id}/Monitoralertsuspensions endpoint. @@ -20,4 +26,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MonitorAlertSuspension: The parsed response data. """ - return self._parse_one(MonitorAlertSuspension, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MonitorAlertSuspension, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdOperatingsystemEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdOperatingsystemEndpoint.py index a44933d5f..dec527289 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdOperatingsystemEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdOperatingsystemEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ComputerOperatingSystem: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ComputerOperatingSystem: """ Performs a GET request against the /Computers/{id}/Operatingsystem endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ComputerOperatingSystem: The parsed response data. """ - return self._parse_one(ComputerOperatingSystem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ComputerOperatingSystem, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdPatchingstatsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdPatchingstatsEndpoint.py index 4028419c8..e9e8a78ce 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdPatchingstatsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdPatchingstatsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Patching import ComputerPatchingStats +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Patching import ( + ComputerPatchingStats, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ComputerPatchingStats: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ComputerPatchingStats: """ Performs a GET request against the /Computers/{id}/Patchingstats endpoint. @@ -43,4 +47,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ComputerPatchingStats: The parsed response data. """ - return self._parse_one(ComputerPatchingStats, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ComputerPatchingStats, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdPrintersEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdPrintersEndpoint.py index 8d0127d40..9bfd65c05 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdPrintersEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdPrintersEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerPrinter]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerPrinter]: """ Performs a GET request against the /Computers/{id}/Printers endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerPrinter]: The parsed response data. """ - return self._parse_many(ComputerPrinter, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerPrinter, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdProcessorsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdProcessorsEndpoint.py index e2df48920..c3104a5b1 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdProcessorsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdProcessorsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerProcessor]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerProcessor]: """ Performs a GET request against the /Computers/{id}/Processors endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerProcessor]: The parsed response data. """ - return self._parse_many(ComputerProcessor, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerProcessor, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdRunningscriptsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdRunningscriptsEndpoint.py index 12daeeff7..7c7d4e048 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdRunningscriptsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdRunningscriptsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerRunningScript]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerRunningScript]: """ Performs a GET request against the /Computers/{id}/Runningscripts endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerRunningScript]: The parsed response data. """ - return self._parse_many(ComputerRunningScript, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerRunningScript, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdScheduledscriptsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdScheduledscriptsEndpoint.py index 6131557b6..7a4374324 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdScheduledscriptsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdScheduledscriptsEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ComputersIdScheduledscriptsIdEndpoint import ComputersIdScheduledscriptsIdEndpoint +from pyconnectwise.endpoints.automate.ComputersIdScheduledscriptsIdEndpoint import ( + ComputersIdScheduledscriptsIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.LabTech.Models import ScheduledScript from pyconnectwise.models.base.message_model import GenericMessageModel @@ -47,7 +49,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduledScript]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduledScript]: """ Performs a GET request against the /Computers/{id}/Scheduledscripts endpoint. @@ -57,9 +61,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduledScript]: The parsed response data. """ - return self._parse_many(ScheduledScript, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduledScript, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduledScript: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduledScript: """ Performs a POST request against the /Computers/{id}/Scheduledscripts endpoint. @@ -69,4 +78,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduledScript: The parsed response data. """ - return self._parse_one(ScheduledScript, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ScheduledScript, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdScheduledscriptsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdScheduledscriptsIdEndpoint.py index 5adf88046..dc02054c8 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdScheduledscriptsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdScheduledscriptsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduledScript: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduledScript: """ Performs a GET request against the /Computers/{id}/Scheduledscripts/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduledScript: The parsed response data. """ - return self._parse_one(ScheduledScript, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduledScript, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdScheduledtasksEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdScheduledtasksEndpoint.py index 755a182ca..4acd5e64f 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdScheduledtasksEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdScheduledtasksEndpoint.py @@ -9,7 +9,9 @@ class ComputersIdScheduledtasksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Scheduledtasks", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Computers/{id}/Scheduledtasks endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdScripthistoryEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdScripthistoryEndpoint.py index 1a5431ec3..a000cb048 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdScripthistoryEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdScripthistoryEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerScriptHistory]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerScriptHistory]: """ Performs a GET request against the /Computers/{id}/Scripthistory endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerScriptHistory]: The parsed response data. """ - return self._parse_many(ComputerScriptHistory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerScriptHistory, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdSensorsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdSensorsEndpoint.py index a93ee64ab..bcc84e22f 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdSensorsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdSensorsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerSensor]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerSensor]: """ Performs a GET request against the /Computers/{id}/Sensors endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerSensor]: The parsed response data. """ - return self._parse_many(ComputerSensor, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerSensor, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdServicesEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdServicesEndpoint.py index 4cc414d87..9447ddc06 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdServicesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdServicesEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerService]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerService]: """ Performs a GET request against the /Computers/{id}/Services endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerService]: The parsed response data. """ - return self._parse_many(ComputerService, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerService, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareEndpoint.py index 978a7bca9..4e76b491e 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ComputersIdSoftwareIdEndpoint import ComputersIdSoftwareIdEndpoint +from pyconnectwise.endpoints.automate.ComputersIdSoftwareIdEndpoint import ( + ComputersIdSoftwareIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.LabTech.Models import ComputerSoftware from pyconnectwise.models.base.message_model import GenericMessageModel @@ -47,7 +49,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerSoftware]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerSoftware]: """ Performs a GET request against the /Computers/{id}/Software endpoint. @@ -57,4 +61,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerSoftware]: The parsed response data. """ - return self._parse_many(ComputerSoftware, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerSoftware, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareIdEndpoint.py index 5cfacd98b..d97f1c278 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareIdEndpoint.py @@ -1,7 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ComputersIdSoftwareIdUninstallEndpoint import \ - ComputersIdSoftwareIdUninstallEndpoint +from pyconnectwise.endpoints.automate.ComputersIdSoftwareIdUninstallEndpoint import ( + ComputersIdSoftwareIdUninstallEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareIdUninstallEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareIdUninstallEndpoint.py index 18e2c95ff..446e16d6a 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareIdUninstallEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdSoftwareIdUninstallEndpoint.py @@ -9,7 +9,9 @@ class ComputersIdSoftwareIdUninstallEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Uninstall", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Computers/{id}/Software/{id}/Uninstall endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdSystemslotsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdSystemslotsEndpoint.py index d7e22e3f9..aeb7b6225 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdSystemslotsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdSystemslotsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerSystemSlot]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerSystemSlot]: """ Performs a GET request against the /Computers/{id}/Systemslots endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerSystemSlot]: The parsed response data. """ - return self._parse_many(ComputerSystemSlot, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerSystemSlot, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdUpsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdUpsEndpoint.py index d8cfe2615..c79f58507 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdUpsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdUpsEndpoint.py @@ -10,7 +10,9 @@ class ComputersIdUpsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Ups", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ComputerUps]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ComputerUps]: """ Performs a GET request against the /Computers/{id}/Ups endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerUps]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerUps]: """ Performs a GET request against the /Computers/{id}/Ups endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerUps]: The parsed response data. """ - return self._parse_many(ComputerUps, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerUps, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersIdVideocardsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersIdVideocardsEndpoint.py index 9e1273e16..3636c4eed 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersIdVideocardsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersIdVideocardsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerVideoCard]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerVideoCard]: """ Performs a GET request against the /Computers/{id}/Videocards endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerVideoCard]: The parsed response data. """ - return self._parse_many(ComputerVideoCard, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerVideoCard, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersMaintenancemodesEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersMaintenancemodesEndpoint.py index a3f255e78..79356c012 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersMaintenancemodesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersMaintenancemodesEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MaintenanceMode]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MaintenanceMode]: """ Performs a GET request against the /Computers/Maintenancemodes endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MaintenanceMode]: The parsed response data. """ - return self._parse_many(MaintenanceMode, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MaintenanceMode, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersMemoryslotsEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersMemoryslotsEndpoint.py index ef140f2a7..c13fda7de 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersMemoryslotsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersMemoryslotsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerMemorySlot]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerMemorySlot]: """ Performs a GET request against the /Computers/Memoryslots endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerMemorySlot]: The parsed response data. """ - return self._parse_many(ComputerMemorySlot, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerMemorySlot, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ComputersSoftwareEndpoint.py b/src/pyconnectwise/endpoints/automate/ComputersSoftwareEndpoint.py index 48f43461a..fad987169 100644 --- a/src/pyconnectwise/endpoints/automate/ComputersSoftwareEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ComputersSoftwareEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ComputerSoftware]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ComputerSoftware]: """ Performs a GET request against the /Computers/Software endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ComputerSoftware]: The parsed response data. """ - return self._parse_many(ComputerSoftware, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ComputerSoftware, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ContactsEndpoint.py b/src/pyconnectwise/endpoints/automate/ContactsEndpoint.py index bedc651a4..144fcf645 100644 --- a/src/pyconnectwise/endpoints/automate/ContactsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ContactsEndpoint.py @@ -24,7 +24,9 @@ def id(self, id: int) -> ContactsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Contact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Contact]: """ Performs a GET request against the /Contacts endpoint and returns an initialized PaginatedResponse object. @@ -45,7 +47,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Contact]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Contact]: """ Performs a GET request against the /Contacts endpoint. @@ -55,9 +59,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Contact]: The parsed response data. """ - return self._parse_many(Contact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Contact, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Contact: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Contact: """ Performs a POST request against the /Contacts endpoint. @@ -67,4 +75,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Contact: The parsed response data. """ - return self._parse_one(Contact, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Contact, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ContactsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ContactsIdEndpoint.py index d1cdf438e..7c0182b34 100644 --- a/src/pyconnectwise/endpoints/automate/ContactsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ContactsIdEndpoint.py @@ -10,7 +10,9 @@ class ContactsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Contact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Contact]: """ Performs a GET request against the /Contacts/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Contact: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Contact: """ Performs a GET request against the /Contacts/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Contact: The parsed response data. """ - return self._parse_one(Contact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Contact, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Contact: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Contact: """ Performs a PUT request against the /Contacts/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Contact: The parsed response data. """ - return self._parse_one(Contact, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Contact, super()._make_request("PUT", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /Contacts/{id} endpoint. @@ -65,4 +77,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/DataviewfoldersEndpoint.py b/src/pyconnectwise/endpoints/automate/DataviewfoldersEndpoint.py index cc511436b..34024ddcc 100644 --- a/src/pyconnectwise/endpoints/automate/DataviewfoldersEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DataviewfoldersEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.DataviewfoldersIdEndpoint import DataviewfoldersIdEndpoint +from pyconnectwise.endpoints.automate.DataviewfoldersIdEndpoint import ( + DataviewfoldersIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.LabTech.Models import DataViewFolder from pyconnectwise.models.base.message_model import GenericMessageModel @@ -47,7 +49,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DataViewFolder]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DataViewFolder]: """ Performs a GET request against the /Dataviewfolders endpoint. @@ -57,4 +61,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DataViewFolder]: The parsed response data. """ - return self._parse_many(DataViewFolder, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DataViewFolder, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/DataviewfoldersIdEndpoint.py b/src/pyconnectwise/endpoints/automate/DataviewfoldersIdEndpoint.py index 1b53e680a..1907e5f2f 100644 --- a/src/pyconnectwise/endpoints/automate/DataviewfoldersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DataviewfoldersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DataViewFolder: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DataViewFolder: """ Performs a GET request against the /Dataviewfolders/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DataViewFolder: The parsed response data. """ - return self._parse_one(DataViewFolder, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DataViewFolder, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/DataviewsEndpoint.py b/src/pyconnectwise/endpoints/automate/DataviewsEndpoint.py index 11fed0168..5b24b2ee3 100644 --- a/src/pyconnectwise/endpoints/automate/DataviewsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DataviewsEndpoint.py @@ -24,7 +24,9 @@ def id(self, id: int) -> DataviewsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[DataView]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[DataView]: """ Performs a GET request against the /Dataviews endpoint and returns an initialized PaginatedResponse object. @@ -45,7 +47,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DataView]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DataView]: """ Performs a GET request against the /Dataviews endpoint. @@ -55,4 +59,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DataView]: The parsed response data. """ - return self._parse_many(DataView, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DataView, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/DataviewsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/DataviewsIdEndpoint.py index 6ba44f1ad..f39763d09 100644 --- a/src/pyconnectwise/endpoints/automate/DataviewsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DataviewsIdEndpoint.py @@ -10,7 +10,9 @@ class DataviewsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[DataView]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[DataView]: """ Performs a GET request against the /Dataviews/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DataView: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DataView: """ Performs a GET request against the /Dataviews/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DataView: The parsed response data. """ - return self._parse_one(DataView, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DataView, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsDailyEndpoint.py b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsDailyEndpoint.py index 89572179f..76adedbac 100644 --- a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsDailyEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsDailyEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import DriveStats +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ( + DriveStats, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class DrivesIdDrivestatsDailyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Daily", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[DriveStats]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[DriveStats]: """ Performs a GET request against the /Drives/{id}/Drivestats/Daily endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DriveStats]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DriveStats]: """ Performs a GET request against the /Drives/{id}/Drivestats/Daily endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DriveStats]: The parsed response data. """ - return self._parse_many(DriveStats, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DriveStats, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsEndpoint.py b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsEndpoint.py index 1302c9a54..1ed749d58 100644 --- a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsEndpoint.py @@ -1,9 +1,17 @@ from typing import Any -from pyconnectwise.endpoints.automate.DrivesIdDrivestatsDailyEndpoint import DrivesIdDrivestatsDailyEndpoint -from pyconnectwise.endpoints.automate.DrivesIdDrivestatsMonthlyEndpoint import DrivesIdDrivestatsMonthlyEndpoint -from pyconnectwise.endpoints.automate.DrivesIdDrivestatsWeeklyEndpoint import DrivesIdDrivestatsWeeklyEndpoint -from pyconnectwise.endpoints.automate.DrivesIdDrivestatsYearlyEndpoint import DrivesIdDrivestatsYearlyEndpoint +from pyconnectwise.endpoints.automate.DrivesIdDrivestatsDailyEndpoint import ( + DrivesIdDrivestatsDailyEndpoint, +) +from pyconnectwise.endpoints.automate.DrivesIdDrivestatsMonthlyEndpoint import ( + DrivesIdDrivestatsMonthlyEndpoint, +) +from pyconnectwise.endpoints.automate.DrivesIdDrivestatsWeeklyEndpoint import ( + DrivesIdDrivestatsWeeklyEndpoint, +) +from pyconnectwise.endpoints.automate.DrivesIdDrivestatsYearlyEndpoint import ( + DrivesIdDrivestatsYearlyEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +21,15 @@ class DrivesIdDrivestatsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Drivestats", parent_endpoint=parent_endpoint) - self.weekly = self._register_child_endpoint(DrivesIdDrivestatsWeeklyEndpoint(client, parent_endpoint=self)) - self.daily = self._register_child_endpoint(DrivesIdDrivestatsDailyEndpoint(client, parent_endpoint=self)) - self.yearly = self._register_child_endpoint(DrivesIdDrivestatsYearlyEndpoint(client, parent_endpoint=self)) - self.monthly = self._register_child_endpoint(DrivesIdDrivestatsMonthlyEndpoint(client, parent_endpoint=self)) + self.weekly = self._register_child_endpoint( + DrivesIdDrivestatsWeeklyEndpoint(client, parent_endpoint=self) + ) + self.monthly = self._register_child_endpoint( + DrivesIdDrivestatsMonthlyEndpoint(client, parent_endpoint=self) + ) + self.daily = self._register_child_endpoint( + DrivesIdDrivestatsDailyEndpoint(client, parent_endpoint=self) + ) + self.yearly = self._register_child_endpoint( + DrivesIdDrivestatsYearlyEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsMonthlyEndpoint.py b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsMonthlyEndpoint.py index 7da03dec5..796532194 100644 --- a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsMonthlyEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsMonthlyEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import DriveStats +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ( + DriveStats, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class DrivesIdDrivestatsMonthlyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Monthly", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[DriveStats]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[DriveStats]: """ Performs a GET request against the /Drives/{id}/Drivestats/Monthly endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DriveStats]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DriveStats]: """ Performs a GET request against the /Drives/{id}/Drivestats/Monthly endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DriveStats]: The parsed response data. """ - return self._parse_many(DriveStats, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DriveStats, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsWeeklyEndpoint.py b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsWeeklyEndpoint.py index 6489dc303..3ade3cfa3 100644 --- a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsWeeklyEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsWeeklyEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import DriveStats +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ( + DriveStats, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class DrivesIdDrivestatsWeeklyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Weekly", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[DriveStats]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[DriveStats]: """ Performs a GET request against the /Drives/{id}/Drivestats/Weekly endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DriveStats]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DriveStats]: """ Performs a GET request against the /Drives/{id}/Drivestats/Weekly endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DriveStats]: The parsed response data. """ - return self._parse_many(DriveStats, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DriveStats, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsYearlyEndpoint.py b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsYearlyEndpoint.py index d6241775c..93c48f704 100644 --- a/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsYearlyEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DrivesIdDrivestatsYearlyEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import DriveStats +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ( + DriveStats, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class DrivesIdDrivestatsYearlyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Yearly", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[DriveStats]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[DriveStats]: """ Performs a GET request against the /Drives/{id}/Drivestats/Yearly endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DriveStats]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DriveStats]: """ Performs a GET request against the /Drives/{id}/Drivestats/Yearly endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DriveStats]: The parsed response data. """ - return self._parse_many(DriveStats, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DriveStats, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/DrivesIdEndpoint.py b/src/pyconnectwise/endpoints/automate/DrivesIdEndpoint.py index c3e5fdda2..27a63356b 100644 --- a/src/pyconnectwise/endpoints/automate/DrivesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/DrivesIdEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.DrivesIdDrivestatsEndpoint import DrivesIdDrivestatsEndpoint +from pyconnectwise.endpoints.automate.DrivesIdDrivestatsEndpoint import ( + DrivesIdDrivestatsEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class DrivesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.drivestats = self._register_child_endpoint(DrivesIdDrivestatsEndpoint(client, parent_endpoint=self)) + self.drivestats = self._register_child_endpoint( + DrivesIdDrivestatsEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/automate/EventlogsEndpoint.py b/src/pyconnectwise/endpoints/automate/EventlogsEndpoint.py index 4c000abd3..33eebdd96 100644 --- a/src/pyconnectwise/endpoints/automate/EventlogsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/EventlogsEndpoint.py @@ -10,7 +10,9 @@ class EventlogsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Eventlogs", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[EventLog]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[EventLog]: """ Performs a GET request against the /Eventlogs endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EventLog]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EventLog]: """ Performs a GET request against the /Eventlogs endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EventLog]: The parsed response data. """ - return self._parse_many(EventLog, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EventLog, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsClientsEndpoint.py b/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsClientsEndpoint.py index 6ecac8495..525dcb37e 100644 --- a/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsClientsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsClientsEndpoint.py @@ -1,7 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ExternalsystemcredentialsClientsIdEndpoint import \ - ExternalsystemcredentialsClientsIdEndpoint +from pyconnectwise.endpoints.automate.ExternalsystemcredentialsClientsIdEndpoint import ( + ExternalsystemcredentialsClientsIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> ExternalsystemcredentialsClientsIdEndpoint: Returns: ExternalsystemcredentialsClientsIdEndpoint: The initialized ExternalsystemcredentialsClientsIdEndpoint object. """ - child = ExternalsystemcredentialsClientsIdEndpoint(self.client, parent_endpoint=self) + child = ExternalsystemcredentialsClientsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsClientsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsClientsIdEndpoint.py index 108b1d7a4..89344400b 100644 --- a/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsClientsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsClientsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ExternalSystemCredentials]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ExternalSystemCredentials]: """ Performs a GET request against the /Externalsystemcredentials/Clients/{id} endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ExternalSystemCredentials]: The parsed response data. """ return self._parse_many( - ExternalSystemCredentials, super()._make_request("GET", data=data, params=params).json() + ExternalSystemCredentials, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsEndpoint.py b/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsEndpoint.py index 89a1ca147..196796662 100644 --- a/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ExternalsystemcredentialsEndpoint.py @@ -1,7 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ExternalsystemcredentialsClientsEndpoint import \ - ExternalsystemcredentialsClientsEndpoint +from pyconnectwise.endpoints.automate.ExternalsystemcredentialsClientsEndpoint import ( + ExternalsystemcredentialsClientsEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -9,7 +10,9 @@ class ExternalsystemcredentialsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Externalsystemcredentials", parent_endpoint=parent_endpoint) + super().__init__( + client, "Externalsystemcredentials", parent_endpoint=parent_endpoint + ) self.clients = self._register_child_endpoint( ExternalsystemcredentialsClientsEndpoint(client, parent_endpoint=self) diff --git a/src/pyconnectwise/endpoints/automate/FeatureflagsEndpoint.py b/src/pyconnectwise/endpoints/automate/FeatureflagsEndpoint.py index a24677512..f5ebce033 100644 --- a/src/pyconnectwise/endpoints/automate/FeatureflagsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/FeatureflagsEndpoint.py @@ -10,7 +10,9 @@ class FeatureflagsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Featureflags", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> FeatureFlag: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> FeatureFlag: """ Performs a POST request against the /Featureflags endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: FeatureFlag: The parsed response data. """ - return self._parse_one(FeatureFlag, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + FeatureFlag, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/GrouppatchingpoliciesEndpoint.py b/src/pyconnectwise/endpoints/automate/GrouppatchingpoliciesEndpoint.py index de9e0722c..624ab2f32 100644 --- a/src/pyconnectwise/endpoints/automate/GrouppatchingpoliciesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/GrouppatchingpoliciesEndpoint.py @@ -1,14 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Patching import GroupPatchingPolicy +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Patching import ( + GroupPatchingPolicy, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class GrouppatchingpoliciesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Grouppatchingpolicies", parent_endpoint=parent_endpoint) + super().__init__( + client, "Grouppatchingpolicies", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -33,7 +37,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[GroupPatchingPolicy]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[GroupPatchingPolicy]: """ Performs a GET request against the /Grouppatchingpolicies endpoint. @@ -43,4 +49,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[GroupPatchingPolicy]: The parsed response data. """ - return self._parse_many(GroupPatchingPolicy, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + GroupPatchingPolicy, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/GroupsEndpoint.py b/src/pyconnectwise/endpoints/automate/GroupsEndpoint.py index 90af1d0e6..6ea7f1769 100644 --- a/src/pyconnectwise/endpoints/automate/GroupsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/GroupsEndpoint.py @@ -24,7 +24,9 @@ def id(self, id: int) -> GroupsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Group]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Group]: """ Performs a GET request against the /Groups endpoint and returns an initialized PaginatedResponse object. @@ -45,7 +47,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Group]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Group]: """ Performs a GET request against the /Groups endpoint. @@ -55,9 +59,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Group]: The parsed response data. """ - return self._parse_many(Group, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Group, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Group: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Group: """ Performs a POST request against the /Groups endpoint. @@ -67,4 +75,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Group: The parsed response data. """ - return self._parse_one(Group, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Group, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/GroupsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/GroupsIdEndpoint.py index 74a51113c..89afd8042 100644 --- a/src/pyconnectwise/endpoints/automate/GroupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/GroupsIdEndpoint.py @@ -10,7 +10,9 @@ class GroupsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Group]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Group]: """ Performs a GET request against the /Groups/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Group: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Group: """ Performs a GET request against the /Groups/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: Group: The parsed response data. """ - return self._parse_one(Group, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Group, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/InternalmonitorresultsEndpoint.py b/src/pyconnectwise/endpoints/automate/InternalmonitorresultsEndpoint.py index 973d37eec..eaeb0d3db 100644 --- a/src/pyconnectwise/endpoints/automate/InternalmonitorresultsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/InternalmonitorresultsEndpoint.py @@ -7,4 +7,6 @@ class InternalmonitorresultsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Internalmonitorresults", parent_endpoint=parent_endpoint) + super().__init__( + client, "Internalmonitorresults", parent_endpoint=parent_endpoint + ) diff --git a/src/pyconnectwise/endpoints/automate/LicensedproductsEndpoint.py b/src/pyconnectwise/endpoints/automate/LicensedproductsEndpoint.py index 8adcb6798..41c4c3580 100644 --- a/src/pyconnectwise/endpoints/automate/LicensedproductsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LicensedproductsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LicensedProduct]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LicensedProduct]: """ Performs a GET request against the /Licensedproducts endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LicensedProduct]: The parsed response data. """ - return self._parse_many(LicensedProduct, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LicensedProduct, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/LinksEndpoint.py b/src/pyconnectwise/endpoints/automate/LinksEndpoint.py index eef437b08..f80ca12d1 100644 --- a/src/pyconnectwise/endpoints/automate/LinksEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LinksEndpoint.py @@ -10,7 +10,9 @@ class LinksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Links", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Link]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Link]: """ Performs a GET request against the /Links endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Link]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Link]: """ Performs a GET request against the /Links endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Link]: The parsed response data. """ - return self._parse_many(Link, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Link, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/LocationsEndpoint.py b/src/pyconnectwise/endpoints/automate/LocationsEndpoint.py index 5e4bb4a12..96998ab07 100644 --- a/src/pyconnectwise/endpoints/automate/LocationsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LocationsEndpoint.py @@ -25,7 +25,9 @@ def id(self, id: int) -> LocationsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Location]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Location]: """ Performs a GET request against the /Locations endpoint and returns an initialized PaginatedResponse object. @@ -46,7 +48,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Location]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Location]: """ Performs a GET request against the /Locations endpoint. @@ -56,9 +60,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Location]: The parsed response data. """ - return self._parse_many(Location, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Location, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Location: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Location: """ Performs a POST request against the /Locations endpoint. @@ -68,4 +76,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Location: The parsed response data. """ - return self._parse_one(Location, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Location, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/LocationsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/LocationsIdEndpoint.py index 32a0e5217..bd8c99087 100644 --- a/src/pyconnectwise/endpoints/automate/LocationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LocationsIdEndpoint.py @@ -1,7 +1,11 @@ from typing import Any -from pyconnectwise.endpoints.automate.LocationsIdProbeconfigurationEndpoint import LocationsIdProbeconfigurationEndpoint -from pyconnectwise.endpoints.automate.LocationsIdUpgradeprobeEndpoint import LocationsIdUpgradeprobeEndpoint +from pyconnectwise.endpoints.automate.LocationsIdProbeconfigurationEndpoint import ( + LocationsIdProbeconfigurationEndpoint, +) +from pyconnectwise.endpoints.automate.LocationsIdUpgradeprobeEndpoint import ( + LocationsIdUpgradeprobeEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class LocationsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) + self.upgradeprobe = self._register_child_endpoint( + LocationsIdUpgradeprobeEndpoint(client, parent_endpoint=self) + ) self.probeconfiguration = self._register_child_endpoint( LocationsIdProbeconfigurationEndpoint(client, parent_endpoint=self) ) - self.upgradeprobe = self._register_child_endpoint(LocationsIdUpgradeprobeEndpoint(client, parent_endpoint=self)) diff --git a/src/pyconnectwise/endpoints/automate/LocationsIdProbeconfigurationEndpoint.py b/src/pyconnectwise/endpoints/automate/LocationsIdProbeconfigurationEndpoint.py index 0346eb051..9ad269e6a 100644 --- a/src/pyconnectwise/endpoints/automate/LocationsIdProbeconfigurationEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LocationsIdProbeconfigurationEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ProbeConfiguration +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ( + ProbeConfiguration, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProbeConfiguration: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProbeConfiguration: """ Performs a GET request against the /Locations/{id}/Probeconfiguration endpoint. @@ -43,9 +47,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProbeConfiguration: The parsed response data. """ - return self._parse_one(ProbeConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProbeConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProbeConfiguration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProbeConfiguration: """ Performs a POST request against the /Locations/{id}/Probeconfiguration endpoint. @@ -55,9 +64,14 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProbeConfiguration: The parsed response data. """ - return self._parse_one(ProbeConfiguration, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProbeConfiguration, + super()._make_request("POST", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /Locations/{id}/Probeconfiguration endpoint. @@ -67,9 +81,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProbeConfiguration: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProbeConfiguration: """ Performs a PATCH request against the /Locations/{id}/Probeconfiguration endpoint. @@ -79,4 +98,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProbeConfiguration: The parsed response data. """ - return self._parse_one(ProbeConfiguration, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProbeConfiguration, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/LocationsIdUpgradeprobeEndpoint.py b/src/pyconnectwise/endpoints/automate/LocationsIdUpgradeprobeEndpoint.py index 8d75a02da..6fd4f9eab 100644 --- a/src/pyconnectwise/endpoints/automate/LocationsIdUpgradeprobeEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LocationsIdUpgradeprobeEndpoint.py @@ -9,7 +9,9 @@ class LocationsIdUpgradeprobeEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Upgradeprobe", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Locations/{id}/Upgradeprobe endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/LookupsEndpoint.py b/src/pyconnectwise/endpoints/automate/LookupsEndpoint.py index 87f4378b7..79e83ec25 100644 --- a/src/pyconnectwise/endpoints/automate/LookupsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LookupsEndpoint.py @@ -1,11 +1,20 @@ from typing import Any -from pyconnectwise.endpoints.automate.LookupsProbeeventlevelsEndpoint import LookupsProbeeventlevelsEndpoint -from pyconnectwise.endpoints.automate.LookupsScanfrequenciesEndpoint import LookupsScanfrequenciesEndpoint -from pyconnectwise.endpoints.automate.LookupsSnmpencryptionmethodsEndpoint import LookupsSnmpencryptionmethodsEndpoint -from pyconnectwise.endpoints.automate.LookupsSnmphashmethodsEndpoint import LookupsSnmphashmethodsEndpoint -from pyconnectwise.endpoints.automate.LookupsStatusscannetworkportoptionsEndpoint import \ - LookupsStatusscannetworkportoptionsEndpoint +from pyconnectwise.endpoints.automate.LookupsProbeeventlevelsEndpoint import ( + LookupsProbeeventlevelsEndpoint, +) +from pyconnectwise.endpoints.automate.LookupsScanfrequenciesEndpoint import ( + LookupsScanfrequenciesEndpoint, +) +from pyconnectwise.endpoints.automate.LookupsSnmpencryptionmethodsEndpoint import ( + LookupsSnmpencryptionmethodsEndpoint, +) +from pyconnectwise.endpoints.automate.LookupsSnmphashmethodsEndpoint import ( + LookupsSnmphashmethodsEndpoint, +) +from pyconnectwise.endpoints.automate.LookupsStatusscannetworkportoptionsEndpoint import ( + LookupsStatusscannetworkportoptionsEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,17 +24,17 @@ class LookupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Lookups", parent_endpoint=parent_endpoint) + self.snmphashmethods = self._register_child_endpoint( + LookupsSnmphashmethodsEndpoint(client, parent_endpoint=self) + ) self.scanfrequencies = self._register_child_endpoint( LookupsScanfrequenciesEndpoint(client, parent_endpoint=self) ) - self.statusscannetworkportoptions = self._register_child_endpoint( - LookupsStatusscannetworkportoptionsEndpoint(client, parent_endpoint=self) - ) self.snmpencryptionmethods = self._register_child_endpoint( LookupsSnmpencryptionmethodsEndpoint(client, parent_endpoint=self) ) - self.snmphashmethods = self._register_child_endpoint( - LookupsSnmphashmethodsEndpoint(client, parent_endpoint=self) + self.statusscannetworkportoptions = self._register_child_endpoint( + LookupsStatusscannetworkportoptionsEndpoint(client, parent_endpoint=self) ) self.probeeventlevels = self._register_child_endpoint( LookupsProbeeventlevelsEndpoint(client, parent_endpoint=self) diff --git a/src/pyconnectwise/endpoints/automate/LookupsProbeeventlevelsEndpoint.py b/src/pyconnectwise/endpoints/automate/LookupsProbeeventlevelsEndpoint.py index 79e686e75..e0e2e4cae 100644 --- a/src/pyconnectwise/endpoints/automate/LookupsProbeeventlevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LookupsProbeeventlevelsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ProbeEventLevel +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ( + ProbeEventLevel, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProbeEventLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProbeEventLevel]: """ Performs a GET request against the /Lookups/Probeeventlevels endpoint. @@ -43,4 +47,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProbeEventLevel]: The parsed response data. """ - return self._parse_many(ProbeEventLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProbeEventLevel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/LookupsScanfrequenciesEndpoint.py b/src/pyconnectwise/endpoints/automate/LookupsScanfrequenciesEndpoint.py index 81b4b7cbc..8bd238a91 100644 --- a/src/pyconnectwise/endpoints/automate/LookupsScanfrequenciesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LookupsScanfrequenciesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ScanFrequency +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ( + ScanFrequency, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScanFrequency]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScanFrequency]: """ Performs a GET request against the /Lookups/Scanfrequencies endpoint. @@ -43,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScanFrequency]: The parsed response data. """ - return self._parse_many(ScanFrequency, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScanFrequency, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/LookupsSnmpencryptionmethodsEndpoint.py b/src/pyconnectwise/endpoints/automate/LookupsSnmpencryptionmethodsEndpoint.py index df88dc18c..af93ccf1c 100644 --- a/src/pyconnectwise/endpoints/automate/LookupsSnmpencryptionmethodsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LookupsSnmpencryptionmethodsEndpoint.py @@ -1,14 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import EncryptionMethod +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ( + EncryptionMethod, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class LookupsSnmpencryptionmethodsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Snmpencryptionmethods", parent_endpoint=parent_endpoint) + super().__init__( + client, "Snmpencryptionmethods", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -33,7 +37,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EncryptionMethod]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EncryptionMethod]: """ Performs a GET request against the /Lookups/Snmpencryptionmethods endpoint. @@ -43,4 +49,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EncryptionMethod]: The parsed response data. """ - return self._parse_many(EncryptionMethod, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EncryptionMethod, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/LookupsSnmphashmethodsEndpoint.py b/src/pyconnectwise/endpoints/automate/LookupsSnmphashmethodsEndpoint.py index 2cd2f13b2..d2e458c80 100644 --- a/src/pyconnectwise/endpoints/automate/LookupsSnmphashmethodsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LookupsSnmphashmethodsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import HashMethod +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ( + HashMethod, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class LookupsSnmphashmethodsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Snmphashmethods", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[HashMethod]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[HashMethod]: """ Performs a GET request against the /Lookups/Snmphashmethods endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[HashMethod]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[HashMethod]: """ Performs a GET request against the /Lookups/Snmphashmethods endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[HashMethod]: The parsed response data. """ - return self._parse_many(HashMethod, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + HashMethod, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/LookupsStatusscannetworkportoptionsEndpoint.py b/src/pyconnectwise/endpoints/automate/LookupsStatusscannetworkportoptionsEndpoint.py index 1db5b3d6f..f49ec4a28 100644 --- a/src/pyconnectwise/endpoints/automate/LookupsStatusscannetworkportoptionsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/LookupsStatusscannetworkportoptionsEndpoint.py @@ -1,15 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import \ - StatusScanNetworkPortOption +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ( + StatusScanNetworkPortOption, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class LookupsStatusscannetworkportoptionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Statusscannetworkportoptions", parent_endpoint=parent_endpoint) + super().__init__( + client, "Statusscannetworkportoptions", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -34,7 +37,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[StatusScanNetworkPortOption]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[StatusScanNetworkPortOption]: """ Performs a GET request against the /Lookups/Statusscannetworkportoptions endpoint. @@ -45,5 +50,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[StatusScanNetworkPortOption]: The parsed response data. """ return self._parse_many( - StatusScanNetworkPortOption, super()._make_request("GET", data=data, params=params).json() + StatusScanNetworkPortOption, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/automate/MaintenancewindowdefinitionsEndpoint.py b/src/pyconnectwise/endpoints/automate/MaintenancewindowdefinitionsEndpoint.py index 21a8e8c6f..a3bfc104b 100644 --- a/src/pyconnectwise/endpoints/automate/MaintenancewindowdefinitionsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/MaintenancewindowdefinitionsEndpoint.py @@ -1,14 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Maintenance import MaintenanceWindowDefinition +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Maintenance import ( + MaintenanceWindowDefinition, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class MaintenancewindowdefinitionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Maintenancewindowdefinitions", parent_endpoint=parent_endpoint) + super().__init__( + client, "Maintenancewindowdefinitions", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -33,7 +37,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MaintenanceWindowDefinition]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MaintenanceWindowDefinition]: """ Performs a GET request against the /Maintenancewindowdefinitions endpoint. @@ -44,5 +50,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[MaintenanceWindowDefinition]: The parsed response data. """ return self._parse_many( - MaintenanceWindowDefinition, super()._make_request("GET", data=data, params=params).json() + MaintenanceWindowDefinition, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/automate/MicrosoftupdatepoliciesEndpoint.py b/src/pyconnectwise/endpoints/automate/MicrosoftupdatepoliciesEndpoint.py index 2c39379aa..6ca749a97 100644 --- a/src/pyconnectwise/endpoints/automate/MicrosoftupdatepoliciesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/MicrosoftupdatepoliciesEndpoint.py @@ -7,4 +7,6 @@ class MicrosoftupdatepoliciesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Microsoftupdatepolicies", parent_endpoint=parent_endpoint) + super().__init__( + client, "Microsoftupdatepolicies", parent_endpoint=parent_endpoint + ) diff --git a/src/pyconnectwise/endpoints/automate/MonitorsIdCollecteddataEndpoint.py b/src/pyconnectwise/endpoints/automate/MonitorsIdCollecteddataEndpoint.py index 056a5ae15..e8cd9c7bd 100644 --- a/src/pyconnectwise/endpoints/automate/MonitorsIdCollecteddataEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/MonitorsIdCollecteddataEndpoint.py @@ -1,13 +1,17 @@ from typing import Any -from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataDailyaveragesEndpoint import \ - MonitorsIdCollecteddataDailyaveragesEndpoint -from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataMonthlyaveragesEndpoint import \ - MonitorsIdCollecteddataMonthlyaveragesEndpoint -from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataWeeklyaveragesEndpoint import \ - MonitorsIdCollecteddataWeeklyaveragesEndpoint -from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataYearlyaveragesEndpoint import \ - MonitorsIdCollecteddataYearlyaveragesEndpoint +from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataDailyaveragesEndpoint import ( + MonitorsIdCollecteddataDailyaveragesEndpoint, +) +from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataMonthlyaveragesEndpoint import ( + MonitorsIdCollecteddataMonthlyaveragesEndpoint, +) +from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataWeeklyaveragesEndpoint import ( + MonitorsIdCollecteddataWeeklyaveragesEndpoint, +) +from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataYearlyaveragesEndpoint import ( + MonitorsIdCollecteddataYearlyaveragesEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -23,9 +27,9 @@ def __init__(self, client, parent_endpoint=None): self.dailyaverages = self._register_child_endpoint( MonitorsIdCollecteddataDailyaveragesEndpoint(client, parent_endpoint=self) ) - self.yearlyaverages = self._register_child_endpoint( - MonitorsIdCollecteddataYearlyaveragesEndpoint(client, parent_endpoint=self) - ) self.monthlyaverages = self._register_child_endpoint( MonitorsIdCollecteddataMonthlyaveragesEndpoint(client, parent_endpoint=self) ) + self.yearlyaverages = self._register_child_endpoint( + MonitorsIdCollecteddataYearlyaveragesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/automate/MonitorsIdDatacollectionsettingsEndpoint.py b/src/pyconnectwise/endpoints/automate/MonitorsIdDatacollectionsettingsEndpoint.py index 44b45b884..cf7480b7c 100644 --- a/src/pyconnectwise/endpoints/automate/MonitorsIdDatacollectionsettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/MonitorsIdDatacollectionsettingsEndpoint.py @@ -1,14 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import MonitorDataCollectionSettings +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ( + MonitorDataCollectionSettings, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class MonitorsIdDatacollectionsettingsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Datacollectionsettings", parent_endpoint=parent_endpoint) + super().__init__( + client, "Datacollectionsettings", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -33,7 +37,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MonitorDataCollectionSettings: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MonitorDataCollectionSettings: """ Performs a GET request against the /Monitors/{id}/Datacollectionsettings endpoint. @@ -44,5 +50,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M MonitorDataCollectionSettings: The parsed response data. """ return self._parse_one( - MonitorDataCollectionSettings, super()._make_request("GET", data=data, params=params).json() + MonitorDataCollectionSettings, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/automate/MonitorsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/MonitorsIdEndpoint.py index 8d58cb2fc..d3fb28d8d 100644 --- a/src/pyconnectwise/endpoints/automate/MonitorsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/MonitorsIdEndpoint.py @@ -1,8 +1,11 @@ from typing import Any -from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataEndpoint import MonitorsIdCollecteddataEndpoint -from pyconnectwise.endpoints.automate.MonitorsIdDatacollectionsettingsEndpoint import \ - MonitorsIdDatacollectionsettingsEndpoint +from pyconnectwise.endpoints.automate.MonitorsIdCollecteddataEndpoint import ( + MonitorsIdCollecteddataEndpoint, +) +from pyconnectwise.endpoints.automate.MonitorsIdDatacollectionsettingsEndpoint import ( + MonitorsIdDatacollectionsettingsEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,9 +15,9 @@ class MonitorsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.datacollectionsettings = self._register_child_endpoint( - MonitorsIdDatacollectionsettingsEndpoint(client, parent_endpoint=self) - ) self.collecteddata = self._register_child_endpoint( MonitorsIdCollecteddataEndpoint(client, parent_endpoint=self) ) + self.datacollectionsettings = self._register_child_endpoint( + MonitorsIdDatacollectionsettingsEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/automate/NetworkdevicesEndpoint.py b/src/pyconnectwise/endpoints/automate/NetworkdevicesEndpoint.py index 8bfa22bbb..5d4adbc79 100644 --- a/src/pyconnectwise/endpoints/automate/NetworkdevicesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/NetworkdevicesEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.NetworkdevicesIdEndpoint import NetworkdevicesIdEndpoint +from pyconnectwise.endpoints.automate.NetworkdevicesIdEndpoint import ( + NetworkdevicesIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.LabTech.Models import NetworkDevice from pyconnectwise.models.base.message_model import GenericMessageModel @@ -47,7 +49,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[NetworkDevice]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[NetworkDevice]: """ Performs a GET request against the /Networkdevices endpoint. @@ -57,9 +61,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[NetworkDevice]: The parsed response data. """ - return self._parse_many(NetworkDevice, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + NetworkDevice, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> NetworkDevice: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> NetworkDevice: """ Performs a POST request against the /Networkdevices endpoint. @@ -69,4 +77,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: NetworkDevice: The parsed response data. """ - return self._parse_one(NetworkDevice, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + NetworkDevice, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/NetworkdevicesIdEndpoint.py b/src/pyconnectwise/endpoints/automate/NetworkdevicesIdEndpoint.py index 820cd8dc5..1a005609a 100644 --- a/src/pyconnectwise/endpoints/automate/NetworkdevicesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/NetworkdevicesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> NetworkDevice: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> NetworkDevice: """ Performs a GET request against the /Networkdevices/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> N Returns: NetworkDevice: The parsed response data. """ - return self._parse_one(NetworkDevice, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + NetworkDevice, super()._make_request("GET", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> NetworkDevice: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> NetworkDevice: """ Performs a PATCH request against the /Networkdevices/{id} endpoint. @@ -55,4 +61,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: NetworkDevice: The parsed response data. """ - return self._parse_one(NetworkDevice, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + NetworkDevice, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/PatchactionsDeployallapprovedEndpoint.py b/src/pyconnectwise/endpoints/automate/PatchactionsDeployallapprovedEndpoint.py index 4e4fab68f..302e6a233 100644 --- a/src/pyconnectwise/endpoints/automate/PatchactionsDeployallapprovedEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PatchactionsDeployallapprovedEndpoint.py @@ -9,7 +9,9 @@ class PatchactionsDeployallapprovedEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Deployallapproved", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Patchactions/Deployallapproved endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/PatchactionsDeployallsecurityEndpoint.py b/src/pyconnectwise/endpoints/automate/PatchactionsDeployallsecurityEndpoint.py index 827fbb03d..144cda80a 100644 --- a/src/pyconnectwise/endpoints/automate/PatchactionsDeployallsecurityEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PatchactionsDeployallsecurityEndpoint.py @@ -9,7 +9,9 @@ class PatchactionsDeployallsecurityEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Deployallsecurity", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Patchactions/Deployallsecurity endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/PatchactionsEndpoint.py b/src/pyconnectwise/endpoints/automate/PatchactionsEndpoint.py index 3a7ef56c8..e5b114691 100644 --- a/src/pyconnectwise/endpoints/automate/PatchactionsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PatchactionsEndpoint.py @@ -1,12 +1,23 @@ from typing import Any -from pyconnectwise.endpoints.automate.PatchactionsDeployallapprovedEndpoint import PatchactionsDeployallapprovedEndpoint -from pyconnectwise.endpoints.automate.PatchactionsDeployallsecurityEndpoint import PatchactionsDeployallsecurityEndpoint -from pyconnectwise.endpoints.automate.PatchactionsReattemptfailedEndpoint import PatchactionsReattemptfailedEndpoint -from pyconnectwise.endpoints.automate.PatchactionsSettopilotstageEndpoint import PatchactionsSettopilotstageEndpoint -from pyconnectwise.endpoints.automate.PatchactionsSettoproductionstageEndpoint import \ - PatchactionsSettoproductionstageEndpoint -from pyconnectwise.endpoints.automate.PatchactionsSettoteststageEndpoint import PatchactionsSettoteststageEndpoint +from pyconnectwise.endpoints.automate.PatchactionsDeployallapprovedEndpoint import ( + PatchactionsDeployallapprovedEndpoint, +) +from pyconnectwise.endpoints.automate.PatchactionsDeployallsecurityEndpoint import ( + PatchactionsDeployallsecurityEndpoint, +) +from pyconnectwise.endpoints.automate.PatchactionsReattemptfailedEndpoint import ( + PatchactionsReattemptfailedEndpoint, +) +from pyconnectwise.endpoints.automate.PatchactionsSettopilotstageEndpoint import ( + PatchactionsSettopilotstageEndpoint, +) +from pyconnectwise.endpoints.automate.PatchactionsSettoproductionstageEndpoint import ( + PatchactionsSettoproductionstageEndpoint, +) +from pyconnectwise.endpoints.automate.PatchactionsSettoteststageEndpoint import ( + PatchactionsSettoteststageEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,21 +27,21 @@ class PatchactionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Patchactions", parent_endpoint=parent_endpoint) - self.settoproductionstage = self._register_child_endpoint( - PatchactionsSettoproductionstageEndpoint(client, parent_endpoint=self) - ) self.reattemptfailed = self._register_child_endpoint( PatchactionsReattemptfailedEndpoint(client, parent_endpoint=self) ) - self.settoteststage = self._register_child_endpoint( - PatchactionsSettoteststageEndpoint(client, parent_endpoint=self) + self.settoproductionstage = self._register_child_endpoint( + PatchactionsSettoproductionstageEndpoint(client, parent_endpoint=self) + ) + self.settopilotstage = self._register_child_endpoint( + PatchactionsSettopilotstageEndpoint(client, parent_endpoint=self) ) self.deployallapproved = self._register_child_endpoint( PatchactionsDeployallapprovedEndpoint(client, parent_endpoint=self) ) + self.settoteststage = self._register_child_endpoint( + PatchactionsSettoteststageEndpoint(client, parent_endpoint=self) + ) self.deployallsecurity = self._register_child_endpoint( PatchactionsDeployallsecurityEndpoint(client, parent_endpoint=self) ) - self.settopilotstage = self._register_child_endpoint( - PatchactionsSettopilotstageEndpoint(client, parent_endpoint=self) - ) diff --git a/src/pyconnectwise/endpoints/automate/PatchactionsReattemptfailedEndpoint.py b/src/pyconnectwise/endpoints/automate/PatchactionsReattemptfailedEndpoint.py index c7881660a..51f7b2703 100644 --- a/src/pyconnectwise/endpoints/automate/PatchactionsReattemptfailedEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PatchactionsReattemptfailedEndpoint.py @@ -9,7 +9,9 @@ class PatchactionsReattemptfailedEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Reattemptfailed", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Patchactions/Reattemptfailed endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/PatchactionsSettopilotstageEndpoint.py b/src/pyconnectwise/endpoints/automate/PatchactionsSettopilotstageEndpoint.py index 3d8010e35..82555c6e4 100644 --- a/src/pyconnectwise/endpoints/automate/PatchactionsSettopilotstageEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PatchactionsSettopilotstageEndpoint.py @@ -9,7 +9,9 @@ class PatchactionsSettopilotstageEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Settopilotstage", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Patchactions/Settopilotstage endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/PatchactionsSettoproductionstageEndpoint.py b/src/pyconnectwise/endpoints/automate/PatchactionsSettoproductionstageEndpoint.py index 50df14609..1dd552685 100644 --- a/src/pyconnectwise/endpoints/automate/PatchactionsSettoproductionstageEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PatchactionsSettoproductionstageEndpoint.py @@ -7,9 +7,13 @@ class PatchactionsSettoproductionstageEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Settoproductionstage", parent_endpoint=parent_endpoint) + super().__init__( + client, "Settoproductionstage", parent_endpoint=parent_endpoint + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Patchactions/Settoproductionstage endpoint. @@ -19,4 +23,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/PatchactionsSettoteststageEndpoint.py b/src/pyconnectwise/endpoints/automate/PatchactionsSettoteststageEndpoint.py index 5eab118b4..003b5abd0 100644 --- a/src/pyconnectwise/endpoints/automate/PatchactionsSettoteststageEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PatchactionsSettoteststageEndpoint.py @@ -9,7 +9,9 @@ class PatchactionsSettoteststageEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Settoteststage", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Patchactions/Settoteststage endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/PatchinformationEndpoint.py b/src/pyconnectwise/endpoints/automate/PatchinformationEndpoint.py index f4f1aa619..c91e22805 100644 --- a/src/pyconnectwise/endpoints/automate/PatchinformationEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PatchinformationEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PatchInformation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PatchInformation: """ Performs a GET request against the /Patchinformation endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PatchInformation: The parsed response data. """ - return self._parse_one(PatchInformation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PatchInformation, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/PermissionsClientsEndpoint.py b/src/pyconnectwise/endpoints/automate/PermissionsClientsEndpoint.py index 05d2d6f29..415c51be0 100644 --- a/src/pyconnectwise/endpoints/automate/PermissionsClientsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PermissionsClientsEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.PermissionsClientsIdEndpoint import PermissionsClientsIdEndpoint +from pyconnectwise.endpoints.automate.PermissionsClientsIdEndpoint import ( + PermissionsClientsIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/automate/PermissionsEndpoint.py b/src/pyconnectwise/endpoints/automate/PermissionsEndpoint.py index c790c44c0..9b95ce57d 100644 --- a/src/pyconnectwise/endpoints/automate/PermissionsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/PermissionsEndpoint.py @@ -1,7 +1,11 @@ from typing import Any -from pyconnectwise.endpoints.automate.PermissionsClientsEndpoint import PermissionsClientsEndpoint -from pyconnectwise.endpoints.automate.PermissionsUsersEndpoint import PermissionsUsersEndpoint +from pyconnectwise.endpoints.automate.PermissionsClientsEndpoint import ( + PermissionsClientsEndpoint, +) +from pyconnectwise.endpoints.automate.PermissionsUsersEndpoint import ( + PermissionsUsersEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,5 +15,9 @@ class PermissionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Permissions", parent_endpoint=parent_endpoint) - self.clients = self._register_child_endpoint(PermissionsClientsEndpoint(client, parent_endpoint=self)) - self.users = self._register_child_endpoint(PermissionsUsersEndpoint(client, parent_endpoint=self)) + self.clients = self._register_child_endpoint( + PermissionsClientsEndpoint(client, parent_endpoint=self) + ) + self.users = self._register_child_endpoint( + PermissionsUsersEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/automate/ProbeconfigurationEnableprobeEndpoint.py b/src/pyconnectwise/endpoints/automate/ProbeconfigurationEnableprobeEndpoint.py index 6803b68f0..5f68d0d9e 100644 --- a/src/pyconnectwise/endpoints/automate/ProbeconfigurationEnableprobeEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ProbeconfigurationEnableprobeEndpoint.py @@ -1,7 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ProbeconfigurationEnableprobeIdEndpoint import \ - ProbeconfigurationEnableprobeIdEndpoint +from pyconnectwise.endpoints.automate.ProbeconfigurationEnableprobeIdEndpoint import ( + ProbeconfigurationEnableprobeIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> ProbeconfigurationEnableprobeIdEndpoint: Returns: ProbeconfigurationEnableprobeIdEndpoint: The initialized ProbeconfigurationEnableprobeIdEndpoint object. """ - child = ProbeconfigurationEnableprobeIdEndpoint(self.client, parent_endpoint=self) + child = ProbeconfigurationEnableprobeIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/automate/ProbeconfigurationEnableprobeIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ProbeconfigurationEnableprobeIdEndpoint.py index 085f5bcd2..b05cb261a 100644 --- a/src/pyconnectwise/endpoints/automate/ProbeconfigurationEnableprobeIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ProbeconfigurationEnableprobeIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ProbeConfiguration +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ( + ProbeConfiguration, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class ProbeconfigurationEnableprobeIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProbeConfiguration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProbeConfiguration: """ Performs a POST request against the /Probeconfiguration/Enableprobe/{id} endpoint. @@ -20,4 +24,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProbeConfiguration: The parsed response data. """ - return self._parse_one(ProbeConfiguration, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProbeConfiguration, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ProbeconfigurationEndpoint.py b/src/pyconnectwise/endpoints/automate/ProbeconfigurationEndpoint.py index 0e49ff260..4d2bc88e2 100644 --- a/src/pyconnectwise/endpoints/automate/ProbeconfigurationEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ProbeconfigurationEndpoint.py @@ -1,7 +1,11 @@ from typing import Any -from pyconnectwise.endpoints.automate.ProbeconfigurationEnableprobeEndpoint import ProbeconfigurationEnableprobeEndpoint -from pyconnectwise.endpoints.automate.ProbeconfigurationIdEndpoint import ProbeconfigurationIdEndpoint +from pyconnectwise.endpoints.automate.ProbeconfigurationEnableprobeEndpoint import ( + ProbeconfigurationEnableprobeEndpoint, +) +from pyconnectwise.endpoints.automate.ProbeconfigurationIdEndpoint import ( + ProbeconfigurationIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdAgentpushcredentialsEndpoint.py b/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdAgentpushcredentialsEndpoint.py index 3f841047e..b451f08e7 100644 --- a/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdAgentpushcredentialsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdAgentpushcredentialsEndpoint.py @@ -1,15 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import \ - ProbeConfigurationCredentials +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ( + ProbeConfigurationCredentials, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class ProbeconfigurationIdAgentpushcredentialsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Agentpushcredentials", parent_endpoint=parent_endpoint) + super().__init__( + client, "Agentpushcredentials", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -34,7 +37,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProbeConfigurationCredentials]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProbeConfigurationCredentials]: """ Performs a GET request against the /Probeconfiguration/{id}/Agentpushcredentials endpoint. @@ -45,10 +50,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ProbeConfigurationCredentials]: The parsed response data. """ return self._parse_many( - ProbeConfigurationCredentials, super()._make_request("GET", data=data, params=params).json() + ProbeConfigurationCredentials, + super()._make_request("GET", data=data, params=params).json(), ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProbeConfigurationCredentials]: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProbeConfigurationCredentials]: """ Performs a PUT request against the /Probeconfiguration/{id}/Agentpushcredentials endpoint. @@ -59,10 +67,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ProbeConfigurationCredentials]: The parsed response data. """ return self._parse_many( - ProbeConfigurationCredentials, super()._make_request("PUT", data=data, params=params).json() + ProbeConfigurationCredentials, + super()._make_request("PUT", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /Probeconfiguration/{id}/Agentpushcredentials endpoint. @@ -72,4 +83,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdEndpoint.py index febba2c2f..3ab301c35 100644 --- a/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdEndpoint.py @@ -1,9 +1,11 @@ from typing import Any -from pyconnectwise.endpoints.automate.ProbeconfigurationIdAgentpushcredentialsEndpoint import \ - ProbeconfigurationIdAgentpushcredentialsEndpoint -from pyconnectwise.endpoints.automate.ProbeconfigurationIdSnmpconfigurationEndpoint import \ - ProbeconfigurationIdSnmpconfigurationEndpoint +from pyconnectwise.endpoints.automate.ProbeconfigurationIdAgentpushcredentialsEndpoint import ( + ProbeconfigurationIdAgentpushcredentialsEndpoint, +) +from pyconnectwise.endpoints.automate.ProbeconfigurationIdSnmpconfigurationEndpoint import ( + ProbeconfigurationIdSnmpconfigurationEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,7 +16,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.agentpushcredentials = self._register_child_endpoint( - ProbeconfigurationIdAgentpushcredentialsEndpoint(client, parent_endpoint=self) + ProbeconfigurationIdAgentpushcredentialsEndpoint( + client, parent_endpoint=self + ) ) self.snmpconfiguration = self._register_child_endpoint( ProbeconfigurationIdSnmpconfigurationEndpoint(client, parent_endpoint=self) diff --git a/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdSnmpconfigurationEndpoint.py b/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdSnmpconfigurationEndpoint.py index 2019317fb..efe986bfe 100644 --- a/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdSnmpconfigurationEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ProbeconfigurationIdSnmpconfigurationEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ProbeSnmpConfiguration +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.NetworkProbe import ( + ProbeSnmpConfiguration, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProbeSnmpConfiguration: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProbeSnmpConfiguration: """ Performs a GET request against the /Probeconfiguration/{id}/Snmpconfiguration endpoint. @@ -43,9 +47,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProbeSnmpConfiguration: The parsed response data. """ - return self._parse_one(ProbeSnmpConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProbeSnmpConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProbeSnmpConfiguration: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProbeSnmpConfiguration: """ Performs a PATCH request against the /Probeconfiguration/{id}/Snmpconfiguration endpoint. @@ -55,4 +64,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProbeSnmpConfiguration: The parsed response data. """ - return self._parse_one(ProbeSnmpConfiguration, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProbeSnmpConfiguration, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ProbeeventsEndpoint.py b/src/pyconnectwise/endpoints/automate/ProbeeventsEndpoint.py index 683f8c1ca..8e367f1c0 100644 --- a/src/pyconnectwise/endpoints/automate/ProbeeventsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ProbeeventsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ProbeEvent +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ( + ProbeEvent, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class ProbeeventsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Probeevents", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProbeEvent]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProbeEvent]: """ Performs a GET request against the /Probeevents endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProbeEvent]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProbeEvent]: """ Performs a GET request against the /Probeevents endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProbeEvent]: The parsed response data. """ - return self._parse_many(ProbeEvent, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProbeEvent, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/RemoteagentschedulesEndpoint.py b/src/pyconnectwise/endpoints/automate/RemoteagentschedulesEndpoint.py index ad8bf25a9..3d9dd6de2 100644 --- a/src/pyconnectwise/endpoints/automate/RemoteagentschedulesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/RemoteagentschedulesEndpoint.py @@ -8,7 +8,9 @@ class RemoteagentschedulesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Remoteagentschedules", parent_endpoint=parent_endpoint) + super().__init__( + client, "Remoteagentschedules", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RemoteAgentSchedule]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RemoteAgentSchedule]: """ Performs a GET request against the /Remoteagentschedules endpoint. @@ -43,9 +47,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RemoteAgentSchedule]: The parsed response data. """ - return self._parse_many(RemoteAgentSchedule, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RemoteAgentSchedule, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RemoteAgentSchedule: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RemoteAgentSchedule: """ Performs a POST request against the /Remoteagentschedules endpoint. @@ -55,4 +64,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RemoteAgentSchedule: The parsed response data. """ - return self._parse_one(RemoteAgentSchedule, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + RemoteAgentSchedule, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/RemoteagenttemplatesEndpoint.py b/src/pyconnectwise/endpoints/automate/RemoteagenttemplatesEndpoint.py index 71ccc6b9f..55e9b5e06 100644 --- a/src/pyconnectwise/endpoints/automate/RemoteagenttemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/RemoteagenttemplatesEndpoint.py @@ -8,7 +8,9 @@ class RemoteagenttemplatesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Remoteagenttemplates", parent_endpoint=parent_endpoint) + super().__init__( + client, "Remoteagenttemplates", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RemoteAgentTemplate]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RemoteAgentTemplate]: """ Performs a GET request against the /Remoteagenttemplates endpoint. @@ -43,9 +47,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RemoteAgentTemplate]: The parsed response data. """ - return self._parse_many(RemoteAgentTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RemoteAgentTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RemoteAgentTemplate: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RemoteAgentTemplate: """ Performs a POST request against the /Remoteagenttemplates endpoint. @@ -55,4 +64,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RemoteAgentTemplate: The parsed response data. """ - return self._parse_one(RemoteAgentTemplate, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + RemoteAgentTemplate, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/RetiredassetsEndpoint.py b/src/pyconnectwise/endpoints/automate/RetiredassetsEndpoint.py index 80d5cc3bb..adcdde27b 100644 --- a/src/pyconnectwise/endpoints/automate/RetiredassetsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/RetiredassetsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RetiredAsset]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RetiredAsset]: """ Performs a GET request against the /Retiredassets endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RetiredAsset]: The parsed response data. """ - return self._parse_many(RetiredAsset, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RetiredAsset, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/RoutersEndpoint.py b/src/pyconnectwise/endpoints/automate/RoutersEndpoint.py index 6ec23e250..8067ea649 100644 --- a/src/pyconnectwise/endpoints/automate/RoutersEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/RoutersEndpoint.py @@ -10,7 +10,9 @@ class RoutersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Routers", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Router]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Router]: """ Performs a GET request against the /Routers endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Router]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Router]: """ Performs a GET request against the /Routers endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Router]: The parsed response data. """ - return self._parse_many(Router, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Router, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptfoldersEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptfoldersEndpoint.py index f0b93f4cf..6bc0bbd8b 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptfoldersEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptfoldersEndpoint.py @@ -1,7 +1,11 @@ from typing import Any -from pyconnectwise.endpoints.automate.ScriptfoldersHierarchyEndpoint import ScriptfoldersHierarchyEndpoint -from pyconnectwise.endpoints.automate.ScriptfoldersIdEndpoint import ScriptfoldersIdEndpoint +from pyconnectwise.endpoints.automate.ScriptfoldersHierarchyEndpoint import ( + ScriptfoldersHierarchyEndpoint, +) +from pyconnectwise.endpoints.automate.ScriptfoldersIdEndpoint import ( + ScriptfoldersIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.LabTech.Models import ScriptFolder from pyconnectwise.models.base.message_model import GenericMessageModel @@ -12,7 +16,9 @@ class ScriptfoldersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Scriptfolders", parent_endpoint=parent_endpoint) - self.hierarchy = self._register_child_endpoint(ScriptfoldersHierarchyEndpoint(client, parent_endpoint=self)) + self.hierarchy = self._register_child_endpoint( + ScriptfoldersHierarchyEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScriptfoldersIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScriptFolder]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScriptFolder]: """ Performs a GET request against the /Scriptfolders endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScriptFolder]: The parsed response data. """ - return self._parse_many(ScriptFolder, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScriptFolder, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScriptFolder: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScriptFolder: """ Performs a POST request against the /Scriptfolders endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScriptFolder: The parsed response data. """ - return self._parse_one(ScriptFolder, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ScriptFolder, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptfoldersHierarchyEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptfoldersHierarchyEndpoint.py index d81abd6e8..2587158c1 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptfoldersHierarchyEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptfoldersHierarchyEndpoint.py @@ -10,7 +10,9 @@ class ScriptfoldersHierarchyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Hierarchy", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScriptFolder]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScriptFolder]: """ Performs a GET request against the /Scriptfolders/Hierarchy endpoint. @@ -20,4 +22,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScriptFolder]: The parsed response data. """ - return self._parse_many(ScriptFolder, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScriptFolder, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptfoldersIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptfoldersIdEndpoint.py index 294215e51..2ad434d6f 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptfoldersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptfoldersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScriptFolder: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScriptFolder: """ Performs a GET request against the /Scriptfolders/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScriptFolder: The parsed response data. """ - return self._parse_one(ScriptFolder, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScriptFolder, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /Scriptfolders/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScriptFolder: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScriptFolder: """ Performs a PATCH request against the /Scriptfolders/{id} endpoint. @@ -67,4 +78,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScriptFolder: The parsed response data. """ - return self._parse_one(ScriptFolder, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ScriptFolder, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptingEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptingEndpoint.py index 7504342a7..901bd7abc 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptingEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptingEndpoint.py @@ -1,7 +1,11 @@ from typing import Any -from pyconnectwise.endpoints.automate.ScriptingRunningscriptsEndpoint import ScriptingRunningscriptsEndpoint -from pyconnectwise.endpoints.automate.ScriptingScriptschedulesEndpoint import ScriptingScriptschedulesEndpoint +from pyconnectwise.endpoints.automate.ScriptingRunningscriptsEndpoint import ( + ScriptingRunningscriptsEndpoint, +) +from pyconnectwise.endpoints.automate.ScriptingScriptschedulesEndpoint import ( + ScriptingScriptschedulesEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +15,9 @@ class ScriptingEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Scripting", parent_endpoint=parent_endpoint) - self.runningscripts = self._register_child_endpoint( - ScriptingRunningscriptsEndpoint(client, parent_endpoint=self) - ) self.scriptschedules = self._register_child_endpoint( ScriptingScriptschedulesEndpoint(client, parent_endpoint=self) ) + self.runningscripts = self._register_child_endpoint( + ScriptingRunningscriptsEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptingRunningscriptsEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptingRunningscriptsEndpoint.py index e70b01d10..4d7f9d1f2 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptingRunningscriptsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptingRunningscriptsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts.RunningScripts import RunningScript +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts.RunningScripts import ( + RunningScript, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RunningScript]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RunningScript]: """ Performs a GET request against the /Scripting/Runningscripts endpoint. @@ -43,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RunningScript]: The parsed response data. """ - return self._parse_many(RunningScript, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RunningScript, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptingScriptschedulesEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptingScriptschedulesEndpoint.py index 03f04b715..10330bcae 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptingScriptschedulesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptingScriptschedulesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any -from pyconnectwise.endpoints.automate.ScriptingScriptschedulesIdEndpoint import ScriptingScriptschedulesIdEndpoint +from pyconnectwise.endpoints.automate.ScriptingScriptschedulesIdEndpoint import ( + ScriptingScriptschedulesIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts import ScheduledScript +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts import ( + ScheduledScript, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -47,7 +51,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduledScript]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduledScript]: """ Performs a GET request against the /Scripting/Scriptschedules endpoint. @@ -57,4 +63,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduledScript]: The parsed response data. """ - return self._parse_many(ScheduledScript, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduledScript, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptingScriptschedulesIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptingScriptschedulesIdEndpoint.py index c207067b6..0df81e251 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptingScriptschedulesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptingScriptschedulesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts import ScheduledScript +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts import ( + ScheduledScript, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class ScriptingScriptschedulesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /Scripting/Scriptschedules/{id} endpoint. @@ -20,9 +24,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduledScript: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduledScript: """ Performs a PATCH request against the /Scripting/Scriptschedules/{id} endpoint. @@ -32,4 +41,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduledScript: The parsed response data. """ - return self._parse_one(ScheduledScript, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ScheduledScript, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptsEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptsEndpoint.py index da2e857ea..dbc2b84d1 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.automate.ScriptsIdEndpoint import ScriptsIdEndpoint -from pyconnectwise.endpoints.automate.ScriptsScriptfoldersEndpoint import ScriptsScriptfoldersEndpoint +from pyconnectwise.endpoints.automate.ScriptsScriptfoldersEndpoint import ( + ScriptsScriptfoldersEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts import Script from pyconnectwise.models.base.message_model import GenericMessageModel @@ -12,7 +14,9 @@ class ScriptsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Scripts", parent_endpoint=parent_endpoint) - self.scriptfolders = self._register_child_endpoint(ScriptsScriptfoldersEndpoint(client, parent_endpoint=self)) + self.scriptfolders = self._register_child_endpoint( + ScriptsScriptfoldersEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScriptsIdEndpoint: """ @@ -27,7 +31,9 @@ def id(self, id: int) -> ScriptsIdEndpoint: child._id = id return child - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Script: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Script: """ Performs a POST request against the /Scripts endpoint. @@ -37,4 +43,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Script: The parsed response data. """ - return self._parse_one(Script, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Script, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptsIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptsIdEndpoint.py index 5d603cc79..927585051 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptsIdEndpoint.py @@ -11,9 +11,13 @@ class ScriptsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.copy = self._register_child_endpoint(ScriptsIdCopyEndpoint(client, parent_endpoint=self)) + self.copy = self._register_child_endpoint( + ScriptsIdCopyEndpoint(client, parent_endpoint=self) + ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Script: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Script: """ Performs a GET request against the /Scripts/{id} endpoint. @@ -23,9 +27,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Script: The parsed response data. """ - return self._parse_one(Script, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Script, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Script: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Script: """ Performs a PUT request against the /Scripts/{id} endpoint. @@ -35,9 +43,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Script: The parsed response data. """ - return self._parse_one(Script, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Script, super()._make_request("PUT", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /Scripts/{id} endpoint. @@ -47,4 +59,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptsScriptfoldersEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptsScriptfoldersEndpoint.py index c9cbd95af..866b02446 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptsScriptfoldersEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptsScriptfoldersEndpoint.py @@ -1,8 +1,12 @@ from typing import Any -from pyconnectwise.endpoints.automate.ScriptsScriptfoldersIdEndpoint import ScriptsScriptfoldersIdEndpoint +from pyconnectwise.endpoints.automate.ScriptsScriptfoldersIdEndpoint import ( + ScriptsScriptfoldersIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts import SubmittableScriptFolder +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts import ( + SubmittableScriptFolder, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -24,7 +28,9 @@ def id(self, id: int) -> ScriptsScriptfoldersIdEndpoint: child._id = id return child - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SubmittableScriptFolder: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SubmittableScriptFolder: """ Performs a POST request against the /Scripts/Scriptfolders endpoint. @@ -34,4 +40,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SubmittableScriptFolder: The parsed response data. """ - return self._parse_one(SubmittableScriptFolder, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SubmittableScriptFolder, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ScriptsScriptfoldersIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ScriptsScriptfoldersIdEndpoint.py index 0781f45d2..96fb262c3 100644 --- a/src/pyconnectwise/endpoints/automate/ScriptsScriptfoldersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ScriptsScriptfoldersIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts import SubmittableScriptFolder +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Scripts import ( + SubmittableScriptFolder, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class ScriptsScriptfoldersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SubmittableScriptFolder: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SubmittableScriptFolder: """ Performs a POST request against the /Scripts/Scriptfolders/{id} endpoint. @@ -20,4 +24,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SubmittableScriptFolder: The parsed response data. """ - return self._parse_one(SubmittableScriptFolder, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SubmittableScriptFolder, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/SearchesEndpoint.py b/src/pyconnectwise/endpoints/automate/SearchesEndpoint.py index ebb74bed9..e4a1f5cba 100644 --- a/src/pyconnectwise/endpoints/automate/SearchesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/SearchesEndpoint.py @@ -10,7 +10,9 @@ class SearchesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Searches", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Search]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Search]: """ Performs a GET request against the /Searches endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Search]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Search]: """ Performs a GET request against the /Searches endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Search]: The parsed response data. """ - return self._parse_many(Search, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Search, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/SearchfoldersEndpoint.py b/src/pyconnectwise/endpoints/automate/SearchfoldersEndpoint.py index 0c441f7fa..eafa2fd2e 100644 --- a/src/pyconnectwise/endpoints/automate/SearchfoldersEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/SearchfoldersEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SearchFolder]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SearchFolder]: """ Performs a GET request against the /Searchfolders endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SearchFolder]: The parsed response data. """ - return self._parse_many(SearchFolder, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SearchFolder, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SearchFolder: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SearchFolder: """ Performs a POST request against the /Searchfolders endpoint. @@ -55,4 +61,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SearchFolder: The parsed response data. """ - return self._parse_one(SearchFolder, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SearchFolder, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/SensorchecksEndpoint.py b/src/pyconnectwise/endpoints/automate/SensorchecksEndpoint.py index 19801110f..a28cbcef8 100644 --- a/src/pyconnectwise/endpoints/automate/SensorchecksEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/SensorchecksEndpoint.py @@ -10,7 +10,9 @@ class SensorchecksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Sensorchecks", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SensorCheck]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SensorCheck]: """ Performs a GET request against the /Sensorchecks endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SensorCheck]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SensorCheck]: """ Performs a GET request against the /Sensorchecks endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SensorCheck]: The parsed response data. """ - return self._parse_many(SensorCheck, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SensorCheck, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/ServicesIdClassifyEndpoint.py b/src/pyconnectwise/endpoints/automate/ServicesIdClassifyEndpoint.py index 67f56d910..7915a5f78 100644 --- a/src/pyconnectwise/endpoints/automate/ServicesIdClassifyEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ServicesIdClassifyEndpoint.py @@ -9,7 +9,9 @@ class ServicesIdClassifyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Classify", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Services/{id}/Classify endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ServicesIdEndpoint.py b/src/pyconnectwise/endpoints/automate/ServicesIdEndpoint.py index 11086e9fd..db144d578 100644 --- a/src/pyconnectwise/endpoints/automate/ServicesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ServicesIdEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.ServicesIdClassifyEndpoint import ServicesIdClassifyEndpoint +from pyconnectwise.endpoints.automate.ServicesIdClassifyEndpoint import ( + ServicesIdClassifyEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ServicesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.classify = self._register_child_endpoint(ServicesIdClassifyEndpoint(client, parent_endpoint=self)) + self.classify = self._register_child_endpoint( + ServicesIdClassifyEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/automate/StatisticsDrivesEndpoint.py b/src/pyconnectwise/endpoints/automate/StatisticsDrivesEndpoint.py index 7ca2c0b50..9de37bff9 100644 --- a/src/pyconnectwise/endpoints/automate/StatisticsDrivesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/StatisticsDrivesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import DriveStatistics +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models import ( + DriveStatistics, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class StatisticsDrivesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Drives", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DriveStatistics]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DriveStatistics]: """ Performs a GET request against the /Statistics/Drives endpoint. @@ -20,4 +24,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DriveStatistics]: The parsed response data. """ - return self._parse_many(DriveStatistics, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DriveStatistics, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/StatisticsEndpoint.py b/src/pyconnectwise/endpoints/automate/StatisticsEndpoint.py index aa72cb5f7..36dc42e04 100644 --- a/src/pyconnectwise/endpoints/automate/StatisticsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/StatisticsEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.StatisticsDrivesEndpoint import StatisticsDrivesEndpoint +from pyconnectwise.endpoints.automate.StatisticsDrivesEndpoint import ( + StatisticsDrivesEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class StatisticsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Statistics", parent_endpoint=parent_endpoint) - self.drives = self._register_child_endpoint(StatisticsDrivesEndpoint(client, parent_endpoint=self)) + self.drives = self._register_child_endpoint( + StatisticsDrivesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/automate/SystemEndpoint.py b/src/pyconnectwise/endpoints/automate/SystemEndpoint.py index 384dbab34..7eea5bc69 100644 --- a/src/pyconnectwise/endpoints/automate/SystemEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/SystemEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.SystemServerinformationEndpoint import SystemServerinformationEndpoint +from pyconnectwise.endpoints.automate.SystemServerinformationEndpoint import ( + SystemServerinformationEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/automate/SystemServerinformationEndpoint.py b/src/pyconnectwise/endpoints/automate/SystemServerinformationEndpoint.py index 58b14e6e8..7a3118afb 100644 --- a/src/pyconnectwise/endpoints/automate/SystemServerinformationEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/SystemServerinformationEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.System import ServerInformation +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.System import ( + ServerInformation, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServerInformation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServerInformation]: """ Performs a GET request against the /System/Serverinformation endpoint. @@ -43,4 +47,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServerInformation]: The parsed response data. """ - return self._parse_many(ServerInformation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServerInformation, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/SystemcontactsEndpoint.py b/src/pyconnectwise/endpoints/automate/SystemcontactsEndpoint.py index d45eaa8b7..92f827bea 100644 --- a/src/pyconnectwise/endpoints/automate/SystemcontactsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/SystemcontactsEndpoint.py @@ -10,7 +10,9 @@ class SystemcontactsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Systemcontacts", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Contact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Contact]: """ Performs a GET request against the /Systemcontacts endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Contact]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Contact]: """ Performs a GET request against the /Systemcontacts endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Contact]: The parsed response data. """ - return self._parse_many(Contact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Contact, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/TemplateavailablepropertiesEndpoint.py b/src/pyconnectwise/endpoints/automate/TemplateavailablepropertiesEndpoint.py index e7a9caa12..644731742 100644 --- a/src/pyconnectwise/endpoints/automate/TemplateavailablepropertiesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/TemplateavailablepropertiesEndpoint.py @@ -8,7 +8,9 @@ class TemplateavailablepropertiesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Templateavailableproperties", parent_endpoint=parent_endpoint) + super().__init__( + client, "Templateavailableproperties", parent_endpoint=parent_endpoint + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TemplateAvailableProperty]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TemplateAvailableProperty]: """ Performs a GET request against the /Templateavailableproperties endpoint. @@ -44,10 +48,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[TemplateAvailableProperty]: The parsed response data. """ return self._parse_many( - TemplateAvailableProperty, super()._make_request("GET", data=data, params=params).json() + TemplateAvailableProperty, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TemplateAvailableProperty: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TemplateAvailableProperty: """ Performs a POST request against the /Templateavailableproperties endpoint. @@ -58,5 +65,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TemplateAvailableProperty: The parsed response data. """ return self._parse_one( - TemplateAvailableProperty, super()._make_request("POST", data=data, params=params).json() + TemplateAvailableProperty, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/automate/TemplatepropertiesEndpoint.py b/src/pyconnectwise/endpoints/automate/TemplatepropertiesEndpoint.py index 77b76c395..fe89a2b6f 100644 --- a/src/pyconnectwise/endpoints/automate/TemplatepropertiesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/TemplatepropertiesEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TemplateProperty]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TemplateProperty]: """ Performs a GET request against the /Templateproperties endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TemplateProperty]: The parsed response data. """ - return self._parse_many(TemplateProperty, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TemplateProperty, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TemplateProperty: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TemplateProperty: """ Performs a POST request against the /Templateproperties endpoint. @@ -55,4 +62,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TemplateProperty: The parsed response data. """ - return self._parse_one(TemplateProperty, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TemplateProperty, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/ThirdpartyupdatepoliciesEndpoint.py b/src/pyconnectwise/endpoints/automate/ThirdpartyupdatepoliciesEndpoint.py index e7d8fbb99..d142599de 100644 --- a/src/pyconnectwise/endpoints/automate/ThirdpartyupdatepoliciesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/ThirdpartyupdatepoliciesEndpoint.py @@ -7,4 +7,6 @@ class ThirdpartyupdatepoliciesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "Thirdpartyupdatepolicies", parent_endpoint=parent_endpoint) + super().__init__( + client, "Thirdpartyupdatepolicies", parent_endpoint=parent_endpoint + ) diff --git a/src/pyconnectwise/endpoints/automate/UserauditsEndpoint.py b/src/pyconnectwise/endpoints/automate/UserauditsEndpoint.py index 86e5e6327..362864282 100644 --- a/src/pyconnectwise/endpoints/automate/UserauditsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UserauditsEndpoint.py @@ -10,7 +10,9 @@ class UserauditsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Useraudits", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[UserAudit]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[UserAudit]: """ Performs a GET request against the /Useraudits endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UserAudit]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UserAudit]: """ Performs a GET request against the /Useraudits endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[UserAudit]: The parsed response data. """ - return self._parse_many(UserAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + UserAudit, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserAudit: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserAudit: """ Performs a POST request against the /Useraudits endpoint. @@ -53,4 +61,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: UserAudit: The parsed response data. """ - return self._parse_one(UserAudit, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + UserAudit, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UserclassesEndpoint.py b/src/pyconnectwise/endpoints/automate/UserclassesEndpoint.py index 82367e39f..d0612d23a 100644 --- a/src/pyconnectwise/endpoints/automate/UserclassesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UserclassesEndpoint.py @@ -24,7 +24,9 @@ def id(self, id: int) -> UserclassesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[UserClass]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[UserClass]: """ Performs a GET request against the /Userclasses endpoint and returns an initialized PaginatedResponse object. @@ -45,7 +47,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UserClass]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UserClass]: """ Performs a GET request against the /Userclasses endpoint. @@ -55,4 +59,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[UserClass]: The parsed response data. """ - return self._parse_many(UserClass, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + UserClass, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UserclassesIdEndpoint.py b/src/pyconnectwise/endpoints/automate/UserclassesIdEndpoint.py index 31c1cb1ea..2f6681486 100644 --- a/src/pyconnectwise/endpoints/automate/UserclassesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UserclassesIdEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.UserclassesIdWebextensionsEndpoint import UserclassesIdWebextensionsEndpoint +from pyconnectwise.endpoints.automate.UserclassesIdWebextensionsEndpoint import ( + UserclassesIdWebextensionsEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Users import UserClass from pyconnectwise.models.base.message_model import GenericMessageModel @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): UserclassesIdWebextensionsEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[UserClass]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[UserClass]: """ Performs a GET request against the /Userclasses/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserClass: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserClass: """ Performs a GET request against the /Userclasses/{id} endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UserClass: The parsed response data. """ - return self._parse_one(UserClass, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UserClass, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UserclassesIdWebextensionsEndpoint.py b/src/pyconnectwise/endpoints/automate/UserclassesIdWebextensionsEndpoint.py index 90632e906..10579e112 100644 --- a/src/pyconnectwise/endpoints/automate/UserclassesIdWebextensionsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UserclassesIdWebextensionsEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.PresentationLayer.WebExtensions import \ - UserClassWebExtensionViewModel +from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.PresentationLayer.WebExtensions import ( + UserClassWebExtensionViewModel, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +12,9 @@ class UserclassesIdWebextensionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Webextensions", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UserClassWebExtensionViewModel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UserClassWebExtensionViewModel]: """ Performs a GET request against the /Userclasses/{id}/Webextensions endpoint. @@ -22,10 +25,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[UserClassWebExtensionViewModel]: The parsed response data. """ return self._parse_many( - UserClassWebExtensionViewModel, super()._make_request("GET", data=data, params=params).json() + UserClassWebExtensionViewModel, + super()._make_request("GET", data=data, params=params).json(), ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UserClassWebExtensionViewModel]: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UserClassWebExtensionViewModel]: """ Performs a PUT request against the /Userclasses/{id}/Webextensions endpoint. @@ -36,5 +42,6 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[UserClassWebExtensionViewModel]: The parsed response data. """ return self._parse_many( - UserClassWebExtensionViewModel, super()._make_request("PUT", data=data, params=params).json() + UserClassWebExtensionViewModel, + super()._make_request("PUT", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/automate/UserprofilesEndpoint.py b/src/pyconnectwise/endpoints/automate/UserprofilesEndpoint.py index 91c0cde7b..30fb32609 100644 --- a/src/pyconnectwise/endpoints/automate/UserprofilesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UserprofilesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.PresentationLayer import UserProfile +from pyconnectwise.models.automate.LabTech.Repositories.MySQL.Domain.Models.PresentationLayer import ( + UserProfile, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class UserprofilesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Userprofiles", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserProfile: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserProfile: """ Performs a GET request against the /Userprofiles endpoint. @@ -20,4 +24,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UserProfile: The parsed response data. """ - return self._parse_one(UserProfile, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UserProfile, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UsersEndpoint.py b/src/pyconnectwise/endpoints/automate/UsersEndpoint.py index 420963457..6e3fc048b 100644 --- a/src/pyconnectwise/endpoints/automate/UsersEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UsersEndpoint.py @@ -12,7 +12,9 @@ class UsersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Users", parent_endpoint=parent_endpoint) - self.folders = self._register_child_endpoint(UsersFoldersEndpoint(client, parent_endpoint=self)) + self.folders = self._register_child_endpoint( + UsersFoldersEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> UsersIdEndpoint: """ @@ -27,7 +29,9 @@ def id(self, id: int) -> UsersIdEndpoint: child._id = id return child - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> User: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> User: """ Performs a POST request against the /Users endpoint. @@ -37,4 +41,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: User: The parsed response data. """ - return self._parse_one(User, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + User, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UsersFoldersEndpoint.py b/src/pyconnectwise/endpoints/automate/UsersFoldersEndpoint.py index 846f6d26e..d077771f0 100644 --- a/src/pyconnectwise/endpoints/automate/UsersFoldersEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UsersFoldersEndpoint.py @@ -1,6 +1,8 @@ from typing import Any -from pyconnectwise.endpoints.automate.UsersFoldersIdEndpoint import UsersFoldersIdEndpoint +from pyconnectwise.endpoints.automate.UsersFoldersIdEndpoint import ( + UsersFoldersIdEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Users import UserFolder from pyconnectwise.models.base.message_model import GenericMessageModel @@ -24,7 +26,9 @@ def id(self, id: int) -> UsersFoldersIdEndpoint: child._id = id return child - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserFolder: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserFolder: """ Performs a POST request against the /Users/Folders endpoint. @@ -34,4 +38,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: UserFolder: The parsed response data. """ - return self._parse_one(UserFolder, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + UserFolder, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UsersFoldersIdEndpoint.py b/src/pyconnectwise/endpoints/automate/UsersFoldersIdEndpoint.py index 846dccbfa..fdd1162b6 100644 --- a/src/pyconnectwise/endpoints/automate/UsersFoldersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UsersFoldersIdEndpoint.py @@ -10,7 +10,9 @@ class UsersFoldersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[UserFolder]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[UserFolder]: """ Performs a GET request against the /Users/Folders/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserFolder: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserFolder: """ Performs a GET request against the /Users/Folders/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UserFolder: The parsed response data. """ - return self._parse_one(UserFolder, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UserFolder, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /Users/Folders/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserFolder: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserFolder: """ Performs a PATCH request against the /Users/Folders/{id} endpoint. @@ -65,4 +78,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: UserFolder: The parsed response data. """ - return self._parse_one(UserFolder, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + UserFolder, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UsersIdAuthlinkEndpoint.py b/src/pyconnectwise/endpoints/automate/UsersIdAuthlinkEndpoint.py index 6711f79be..06c2b4286 100644 --- a/src/pyconnectwise/endpoints/automate/UsersIdAuthlinkEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UsersIdAuthlinkEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.models.automate.LabTech.RESTApi.Security import AuthServiceCredentials +from pyconnectwise.models.automate.LabTech.RESTApi.Security import ( + AuthServiceCredentials, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +12,9 @@ class UsersIdAuthlinkEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Authlink", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AuthServiceCredentials: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AuthServiceCredentials: """ Performs a POST request against the /Users/{id}/Authlink endpoint. @@ -20,4 +24,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AuthServiceCredentials: The parsed response data. """ - return self._parse_one(AuthServiceCredentials, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AuthServiceCredentials, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/UsersIdChangepasswordEndpoint.py b/src/pyconnectwise/endpoints/automate/UsersIdChangepasswordEndpoint.py index 9721ee7e9..21611ee6a 100644 --- a/src/pyconnectwise/endpoints/automate/UsersIdChangepasswordEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UsersIdChangepasswordEndpoint.py @@ -9,7 +9,9 @@ class UsersIdChangepasswordEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Changepassword", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /Users/{id}/Changepassword endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/automate/UsersIdEndpoint.py b/src/pyconnectwise/endpoints/automate/UsersIdEndpoint.py index 09b66ec9b..fa24435fd 100644 --- a/src/pyconnectwise/endpoints/automate/UsersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UsersIdEndpoint.py @@ -1,10 +1,20 @@ from typing import Any -from pyconnectwise.endpoints.automate.UsersIdAuthlinkEndpoint import UsersIdAuthlinkEndpoint -from pyconnectwise.endpoints.automate.UsersIdChangepasswordEndpoint import UsersIdChangepasswordEndpoint -from pyconnectwise.endpoints.automate.UsersIdFavoritesEndpoint import UsersIdFavoritesEndpoint -from pyconnectwise.endpoints.automate.UsersIdSettingsEndpoint import UsersIdSettingsEndpoint -from pyconnectwise.endpoints.automate.UsersIdUseraccessEndpoint import UsersIdUseraccessEndpoint +from pyconnectwise.endpoints.automate.UsersIdAuthlinkEndpoint import ( + UsersIdAuthlinkEndpoint, +) +from pyconnectwise.endpoints.automate.UsersIdChangepasswordEndpoint import ( + UsersIdChangepasswordEndpoint, +) +from pyconnectwise.endpoints.automate.UsersIdFavoritesEndpoint import ( + UsersIdFavoritesEndpoint, +) +from pyconnectwise.endpoints.automate.UsersIdSettingsEndpoint import ( + UsersIdSettingsEndpoint, +) +from pyconnectwise.endpoints.automate.UsersIdUseraccessEndpoint import ( + UsersIdUseraccessEndpoint, +) from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.models.automate.Automate.Api.Domain.Contracts.Users import User from pyconnectwise.models.base.message_model import GenericMessageModel @@ -15,13 +25,25 @@ class UsersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.changepassword = self._register_child_endpoint(UsersIdChangepasswordEndpoint(client, parent_endpoint=self)) - self.settings = self._register_child_endpoint(UsersIdSettingsEndpoint(client, parent_endpoint=self)) - self.favorites = self._register_child_endpoint(UsersIdFavoritesEndpoint(client, parent_endpoint=self)) - self.useraccess = self._register_child_endpoint(UsersIdUseraccessEndpoint(client, parent_endpoint=self)) - self.authlink = self._register_child_endpoint(UsersIdAuthlinkEndpoint(client, parent_endpoint=self)) + self.authlink = self._register_child_endpoint( + UsersIdAuthlinkEndpoint(client, parent_endpoint=self) + ) + self.settings = self._register_child_endpoint( + UsersIdSettingsEndpoint(client, parent_endpoint=self) + ) + self.useraccess = self._register_child_endpoint( + UsersIdUseraccessEndpoint(client, parent_endpoint=self) + ) + self.changepassword = self._register_child_endpoint( + UsersIdChangepasswordEndpoint(client, parent_endpoint=self) + ) + self.favorites = self._register_child_endpoint( + UsersIdFavoritesEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[User]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[User]: """ Performs a GET request against the /Users/{id} endpoint and returns an initialized PaginatedResponse object. @@ -52,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: User: The parsed response data. """ - return self._parse_one(User, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + User, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /Users/{id} endpoint. @@ -64,9 +90,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> User: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> User: """ Performs a PATCH request against the /Users/{id} endpoint. @@ -76,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: User: The parsed response data. """ - return self._parse_one(User, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + User, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UsersIdFavoritesEndpoint.py b/src/pyconnectwise/endpoints/automate/UsersIdFavoritesEndpoint.py index ab3716918..a0d62ecad 100644 --- a/src/pyconnectwise/endpoints/automate/UsersIdFavoritesEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UsersIdFavoritesEndpoint.py @@ -10,7 +10,9 @@ class UsersIdFavoritesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Favorites", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserFavorite: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserFavorite: """ Performs a POST request against the /Users/{id}/Favorites endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: UserFavorite: The parsed response data. """ - return self._parse_one(UserFavorite, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + UserFavorite, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UsersIdSettingsEndpoint.py b/src/pyconnectwise/endpoints/automate/UsersIdSettingsEndpoint.py index 0224c9ae6..1601835a7 100644 --- a/src/pyconnectwise/endpoints/automate/UsersIdSettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UsersIdSettingsEndpoint.py @@ -10,7 +10,9 @@ class UsersIdSettingsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Settings", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserSetting: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserSetting: """ Performs a POST request against the /Users/{id}/Settings endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: UserSetting: The parsed response data. """ - return self._parse_one(UserSetting, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + UserSetting, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/UsersIdUseraccessEndpoint.py b/src/pyconnectwise/endpoints/automate/UsersIdUseraccessEndpoint.py index 1f38fc0f5..5d7158aa3 100644 --- a/src/pyconnectwise/endpoints/automate/UsersIdUseraccessEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/UsersIdUseraccessEndpoint.py @@ -10,7 +10,9 @@ class UsersIdUseraccessEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "Useraccess", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserAccess: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserAccess: """ Performs a GET request against the /Users/{id}/Useraccess endpoint. @@ -20,4 +22,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UserAccess: The parsed response data. """ - return self._parse_one(UserAccess, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UserAccess, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/automate/VirusscannerdefsEndpoint.py b/src/pyconnectwise/endpoints/automate/VirusscannerdefsEndpoint.py index 045038de9..43f369ba2 100644 --- a/src/pyconnectwise/endpoints/automate/VirusscannerdefsEndpoint.py +++ b/src/pyconnectwise/endpoints/automate/VirusscannerdefsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[VirusScannerDef]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[VirusScannerDef]: """ Performs a GET request against the /Virusscannerdefs endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[VirusScannerDef]: The parsed response data. """ - return self._parse_many(VirusScannerDef, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + VirusScannerDef, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> VirusScannerDef: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> VirusScannerDef: """ Performs a POST request against the /Virusscannerdefs endpoint. @@ -55,4 +62,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: VirusScannerDef: The parsed response data. """ - return self._parse_one(VirusScannerDef, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + VirusScannerDef, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsCountEndpoint.py index 9d509a00d..97691968b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyAddressformatsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/addressFormats/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/addressFormats/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsEndpoint.py index 715dc9b9f..d4d83099f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyAddressformatsCountEndpoint import CompanyAddressformatsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyAddressformatsIdEndpoint import CompanyAddressformatsIdEndpoint -from pyconnectwise.endpoints.manage.CompanyAddressformatsInfoEndpoint import CompanyAddressformatsInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyAddressformatsCountEndpoint import ( + CompanyAddressformatsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyAddressformatsIdEndpoint import ( + CompanyAddressformatsIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyAddressformatsInfoEndpoint import ( + CompanyAddressformatsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AddressFormat from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyAddressformatsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "addressFormats", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyAddressformatsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyAddressformatsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyAddressformatsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyAddressformatsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyAddressformatsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AddressFormat]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AddressFormat]: """ Performs a GET request against the /company/addressFormats endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AddressFormat]: The parsed response data. """ - return self._parse_many(AddressFormat, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AddressFormat, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AddressFormat: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AddressFormat: """ Performs a POST request against the /company/addressFormats endpoint. @@ -74,4 +90,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AddressFormat: The parsed response data. """ - return self._parse_one(AddressFormat, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AddressFormat, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsIdEndpoint.py index 50f4738ae..72767a40e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyAddressformatsIdInfoEndpoint import CompanyAddressformatsIdInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyAddressformatsIdInfoEndpoint import ( + CompanyAddressformatsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AddressFormat from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class CompanyAddressformatsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyAddressformatsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyAddressformatsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AddressFormat: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AddressFormat: """ Performs a GET request against the /company/addressFormats/{id} endpoint. @@ -46,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AddressFormat: The parsed response data. """ - return self._parse_one(AddressFormat, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AddressFormat, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/addressFormats/{id} endpoint. @@ -58,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AddressFormat: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AddressFormat: """ Performs a PUT request against the /company/addressFormats/{id} endpoint. @@ -70,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AddressFormat: The parsed response data. """ - return self._parse_one(AddressFormat, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AddressFormat, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AddressFormat: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AddressFormat: """ Performs a PATCH request against the /company/addressFormats/{id} endpoint. @@ -82,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AddressFormat: The parsed response data. """ - return self._parse_one(AddressFormat, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AddressFormat, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsIdInfoEndpoint.py index 8719cb4db..e8cb7bf10 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AddressFormatInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AddressFormatInfo: """ Performs a GET request against the /company/addressFormats/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AddressFormatInfo: The parsed response data. """ - return self._parse_one(AddressFormatInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AddressFormatInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsInfoCountEndpoint.py index 50e2ca484..c52803cce 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyAddressformatsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/addressFormats/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/addressFormats/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsInfoEndpoint.py index 2ff183559..c96eaf589 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyAddressFormatsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyAddressformatsInfoCountEndpoint import CompanyAddressformatsInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyAddressformatsInfoCountEndpoint import ( + CompanyAddressformatsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AddressFormatInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class CompanyAddressformatsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyAddressformatsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyAddressformatsInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AddressFormatInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AddressFormatInfo]: """ Performs a GET request against the /company/addressFormats/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AddressFormatInfo]: The parsed response data. """ - return self._parse_many(AddressFormatInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AddressFormatInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyBillingSetupsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyBillingSetupsInfoCountEndpoint.py index 4b5ed44f1..29572e1b6 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyBillingSetupsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyBillingSetupsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyBillingsetupsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/billingSetups/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/billingSetups/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyBillingsetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyBillingsetupsEndpoint.py index 2ff456cb9..77fbbac03 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyBillingsetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyBillingsetupsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyBillingsetupsInfoEndpoint import CompanyBillingsetupsInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyBillingsetupsInfoEndpoint import ( + CompanyBillingsetupsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyBillingsetupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "billingSetups", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyBillingsetupsInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyBillingsetupsInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyBillingsetupsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyBillingsetupsInfoEndpoint.py index 47f5828a1..eb2456786 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyBillingsetupsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyBillingsetupsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyBillingsetupsInfoCountEndpoint import CompanyBillingsetupsInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyBillingsetupsInfoCountEndpoint import ( + CompanyBillingsetupsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyBillingsetupsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyBillingsetupsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyBillingsetupsInfoCountEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesCountEndpoint.py index 0cd3dc92a..879858d8a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCommunicationtypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/communicationTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/communicationTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesEndpoint.py index aac23124b..a40aaa022 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCommunicationtypesCountEndpoint import CompanyCommunicationtypesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCommunicationtypesIdEndpoint import CompanyCommunicationtypesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyCommunicationtypesInfoEndpoint import CompanyCommunicationtypesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyCommunicationtypesCountEndpoint import ( + CompanyCommunicationtypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCommunicationtypesIdEndpoint import ( + CompanyCommunicationtypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCommunicationtypesInfoEndpoint import ( + CompanyCommunicationtypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CommunicationType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyCommunicationtypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "communicationTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyCommunicationtypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyCommunicationtypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCommunicationtypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyCommunicationtypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCommunicationtypesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CommunicationType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CommunicationType]: """ Performs a GET request against the /company/communicationTypes endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CommunicationType]: The parsed response data. """ - return self._parse_many(CommunicationType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CommunicationType, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CommunicationType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CommunicationType: """ Performs a POST request against the /company/communicationTypes endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CommunicationType: The parsed response data. """ - return self._parse_one(CommunicationType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CommunicationType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdEndpoint.py index 926a96564..a028d66d5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCommunicationtypesIdInfoEndpoint import \ - CompanyCommunicationtypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.CompanyCommunicationtypesIdUsagesEndpoint import \ - CompanyCommunicationtypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyCommunicationtypesIdInfoEndpoint import ( + CompanyCommunicationtypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCommunicationtypesIdUsagesEndpoint import ( + CompanyCommunicationtypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CommunicationType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,10 +16,12 @@ class CompanyCommunicationtypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyCommunicationtypesIdInfoEndpoint(client, parent_endpoint=self)) self.usages = self._register_child_endpoint( CompanyCommunicationtypesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + CompanyCommunicationtypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -42,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CommunicationType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CommunicationType: """ Performs a GET request against the /company/communicationTypes/{id} endpoint. @@ -52,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CommunicationType: The parsed response data. """ - return self._parse_one(CommunicationType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CommunicationType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/communicationTypes/{id} endpoint. @@ -64,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CommunicationType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CommunicationType: """ Performs a PUT request against the /company/communicationTypes/{id} endpoint. @@ -76,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CommunicationType: The parsed response data. """ - return self._parse_one(CommunicationType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CommunicationType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CommunicationType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CommunicationType: """ Performs a PATCH request against the /company/communicationTypes/{id} endpoint. @@ -88,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CommunicationType: The parsed response data. """ - return self._parse_one(CommunicationType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CommunicationType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdInfoEndpoint.py index 47d6da1bf..5c98c5148 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CommunicationTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CommunicationTypeInfo: """ Performs a GET request against the /company/communicationTypes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CommunicationTypeInfo: The parsed response data. """ - return self._parse_one(CommunicationTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CommunicationTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdUsagesEndpoint.py index 8a3394043..8d7980a9e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCommunicationtypesIdUsagesListEndpoint import \ - CompanyCommunicationtypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyCommunicationtypesIdUsagesListEndpoint import ( + CompanyCommunicationtypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): CompanyCommunicationtypesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/communicationTypes/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/communicationTypes/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdUsagesListEndpoint.py index 31f103983..9d78548c1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyCommunicationtypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/communicationTypes/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/communicationTypes/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesInfoCountEndpoint.py index 6eaf915e4..5910cb916 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCommunicationtypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/communicationTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/communicationTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesInfoEndpoint.py index 8277a3abd..6ddcccf95 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCommunicationTypesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCommunicationtypesInfoCountEndpoint import \ - CompanyCommunicationtypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyCommunicationtypesInfoCountEndpoint import ( + CompanyCommunicationtypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CommunicationTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CommunicationTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CommunicationTypeInfo]: """ Performs a GET request against the /company/communicationTypes/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CommunicationTypeInfo]: The parsed response data. """ - return self._parse_many(CommunicationTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CommunicationTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesCountEndpoint.py index db180aac7..4d1368ad4 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesDefaultEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesDefaultEndpoint.py index 2138e74a2..0a12dad9c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesDefaultEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesDefaultEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesDefaultEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "default", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Company]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Company]: """ Performs a GET request against the /company/companies/default endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a GET request against the /company/companies/default endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesEndpoint.py index 799908668..ba9962f5a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesEndpoint.py @@ -1,12 +1,24 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesCountEndpoint import CompanyCompaniesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesDefaultEndpoint import CompanyCompaniesDefaultEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdEndpoint import CompanyCompaniesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesInfoEndpoint import CompanyCompaniesInfoEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesEndpoint import CompanyCompaniesStatusesEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesTypesEndpoint import CompanyCompaniesTypesEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesCountEndpoint import ( + CompanyCompaniesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesDefaultEndpoint import ( + CompanyCompaniesDefaultEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdEndpoint import ( + CompanyCompaniesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesInfoEndpoint import ( + CompanyCompaniesInfoEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesEndpoint import ( + CompanyCompaniesStatusesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesTypesEndpoint import ( + CompanyCompaniesTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Company from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,11 +28,21 @@ class CompanyCompaniesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "companies", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyCompaniesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyCompaniesCountEndpoint(client, parent_endpoint=self)) - self.default = self._register_child_endpoint(CompanyCompaniesDefaultEndpoint(client, parent_endpoint=self)) - self.types = self._register_child_endpoint(CompanyCompaniesTypesEndpoint(client, parent_endpoint=self)) - self.statuses = self._register_child_endpoint(CompanyCompaniesStatusesEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyCompaniesInfoEndpoint(client, parent_endpoint=self) + ) + self.default = self._register_child_endpoint( + CompanyCompaniesDefaultEndpoint(client, parent_endpoint=self) + ) + self.types = self._register_child_endpoint( + CompanyCompaniesTypesEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + CompanyCompaniesCountEndpoint(client, parent_endpoint=self) + ) + self.statuses = self._register_child_endpoint( + CompanyCompaniesStatusesEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompaniesIdEndpoint: """ @@ -35,7 +57,9 @@ def id(self, id: int) -> CompanyCompaniesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Company]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Company]: """ Performs a GET request against the /company/companies endpoint and returns an initialized PaginatedResponse object. @@ -56,7 +80,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Company]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Company]: """ Performs a GET request against the /company/companies endpoint. @@ -66,9 +92,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Company]: The parsed response data. """ - return self._parse_many(Company, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Company, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a POST request against the /company/companies endpoint. @@ -78,4 +108,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesCountEndpoint.py index 15f3c34a0..1a567e8a6 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdCustomstatusnotesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/customStatusNotes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/customStatusNotes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesEndpoint.py index 23a2bd99b..7be3da957 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdCustomstatusnotesCountEndpoint import \ - CompanyCompaniesIdCustomstatusnotesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdCustomstatusnotesIdEndpoint import \ - CompanyCompaniesIdCustomstatusnotesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdCustomstatusnotesCountEndpoint import ( + CompanyCompaniesIdCustomstatusnotesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdCustomstatusnotesIdEndpoint import ( + CompanyCompaniesIdCustomstatusnotesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyCustomNote from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "customStatusNotes", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyCompaniesIdCustomstatusnotesCountEndpoint(client, parent_endpoint=self) + CompanyCompaniesIdCustomstatusnotesCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyCompaniesIdCustomstatusnotesIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyCompaniesIdCustomstatusnotesIdEndpoint: Returns: CompanyCompaniesIdCustomstatusnotesIdEndpoint: The initialized CompanyCompaniesIdCustomstatusnotesIdEndpoint object. """ - child = CompanyCompaniesIdCustomstatusnotesIdEndpoint(self.client, parent_endpoint=self) + child = CompanyCompaniesIdCustomstatusnotesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyCustomNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyCustomNote]: """ Performs a GET request against the /company/companies/{id}/customStatusNotes endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyCustomNote]: The parsed response data. """ - return self._parse_many(CompanyCustomNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyCustomNote, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCustomNote: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyCustomNote: """ Performs a POST request against the /company/companies/{id}/customStatusNotes endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyCustomNote: The parsed response data. """ - return self._parse_one(CompanyCustomNote, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanyCustomNote, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesIdEndpoint.py index b3bb66e88..c73cb153b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdCustomStatusNotesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCustomNote: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyCustomNote: """ Performs a GET request against the /company/companies/{id}/customStatusNotes/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyCustomNote: The parsed response data. """ - return self._parse_one(CompanyCustomNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyCustomNote, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id}/customStatusNotes/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCustomNote: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyCustomNote: """ Performs a PUT request against the /company/companies/{id}/customStatusNotes/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyCustomNote: The parsed response data. """ - return self._parse_one(CompanyCustomNote, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanyCustomNote, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCustomNote: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyCustomNote: """ Performs a PATCH request against the /company/companies/{id}/customStatusNotes/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyCustomNote: The parsed response data. """ - return self._parse_one(CompanyCustomNote, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CompanyCustomNote, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdEndpoint.py index 82e31e074..ab6d75f57 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdEndpoint.py @@ -1,24 +1,45 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdCustomstatusnotesEndpoint import \ - CompanyCompaniesIdCustomstatusnotesEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdGroupsEndpoint import CompanyCompaniesIdGroupsEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportnotificationsEndpoint import \ - CompanyCompaniesIdManagementreportnotificationsEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportsetupEndpoint import \ - CompanyCompaniesIdManagementreportsetupEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementsummaryreportsEndpoint import \ - CompanyCompaniesIdManagementsummaryreportsEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdMergeEndpoint import CompanyCompaniesIdMergeEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdNotesEndpoint import CompanyCompaniesIdNotesEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesEndpoint import CompanyCompaniesIdSitesEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdSurveysEndpoint import CompanyCompaniesIdSurveysEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdTeamsEndpoint import CompanyCompaniesIdTeamsEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdTracksEndpoint import CompanyCompaniesIdTracksEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdTypeassociationsEndpoint import \ - CompanyCompaniesIdTypeassociationsEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdUsagesEndpoint import CompanyCompaniesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdCustomstatusnotesEndpoint import ( + CompanyCompaniesIdCustomstatusnotesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdGroupsEndpoint import ( + CompanyCompaniesIdGroupsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportnotificationsEndpoint import ( + CompanyCompaniesIdManagementreportnotificationsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportsetupEndpoint import ( + CompanyCompaniesIdManagementreportsetupEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementsummaryreportsEndpoint import ( + CompanyCompaniesIdManagementsummaryreportsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdMergeEndpoint import ( + CompanyCompaniesIdMergeEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdNotesEndpoint import ( + CompanyCompaniesIdNotesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesEndpoint import ( + CompanyCompaniesIdSitesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdSurveysEndpoint import ( + CompanyCompaniesIdSurveysEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdTeamsEndpoint import ( + CompanyCompaniesIdTeamsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdTracksEndpoint import ( + CompanyCompaniesIdTracksEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdTypeassociationsEndpoint import ( + CompanyCompaniesIdTypeassociationsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdUsagesEndpoint import ( + CompanyCompaniesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Company from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -28,31 +49,55 @@ class CompanyCompaniesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.type_associations = self._register_child_endpoint( - CompanyCompaniesIdTypeassociationsEndpoint(client, parent_endpoint=self) + self.notes = self._register_child_endpoint( + CompanyCompaniesIdNotesEndpoint(client, parent_endpoint=self) ) - self.tracks = self._register_child_endpoint(CompanyCompaniesIdTracksEndpoint(client, parent_endpoint=self)) - self.teams = self._register_child_endpoint(CompanyCompaniesIdTeamsEndpoint(client, parent_endpoint=self)) - self.custom_status_notes = self._register_child_endpoint( - CompanyCompaniesIdCustomstatusnotesEndpoint(client, parent_endpoint=self) + self.management_report_setup = self._register_child_endpoint( + CompanyCompaniesIdManagementreportsetupEndpoint( + client, parent_endpoint=self + ) + ) + self.tracks = self._register_child_endpoint( + CompanyCompaniesIdTracksEndpoint(client, parent_endpoint=self) + ) + self.teams = self._register_child_endpoint( + CompanyCompaniesIdTeamsEndpoint(client, parent_endpoint=self) + ) + self.sites = self._register_child_endpoint( + CompanyCompaniesIdSitesEndpoint(client, parent_endpoint=self) + ) + self.merge = self._register_child_endpoint( + CompanyCompaniesIdMergeEndpoint(client, parent_endpoint=self) + ) + self.groups = self._register_child_endpoint( + CompanyCompaniesIdGroupsEndpoint(client, parent_endpoint=self) + ) + self.usages = self._register_child_endpoint( + CompanyCompaniesIdUsagesEndpoint(client, parent_endpoint=self) ) - self.usages = self._register_child_endpoint(CompanyCompaniesIdUsagesEndpoint(client, parent_endpoint=self)) - self.surveys = self._register_child_endpoint(CompanyCompaniesIdSurveysEndpoint(client, parent_endpoint=self)) self.management_summary_reports = self._register_child_endpoint( - CompanyCompaniesIdManagementsummaryreportsEndpoint(client, parent_endpoint=self) + CompanyCompaniesIdManagementsummaryreportsEndpoint( + client, parent_endpoint=self + ) + ) + self.type_associations = self._register_child_endpoint( + CompanyCompaniesIdTypeassociationsEndpoint(client, parent_endpoint=self) ) - self.notes = self._register_child_endpoint(CompanyCompaniesIdNotesEndpoint(client, parent_endpoint=self)) - self.groups = self._register_child_endpoint(CompanyCompaniesIdGroupsEndpoint(client, parent_endpoint=self)) self.management_report_notifications = self._register_child_endpoint( - CompanyCompaniesIdManagementreportnotificationsEndpoint(client, parent_endpoint=self) + CompanyCompaniesIdManagementreportnotificationsEndpoint( + client, parent_endpoint=self + ) ) - self.management_report_setup = self._register_child_endpoint( - CompanyCompaniesIdManagementreportsetupEndpoint(client, parent_endpoint=self) + self.custom_status_notes = self._register_child_endpoint( + CompanyCompaniesIdCustomstatusnotesEndpoint(client, parent_endpoint=self) + ) + self.surveys = self._register_child_endpoint( + CompanyCompaniesIdSurveysEndpoint(client, parent_endpoint=self) ) - self.sites = self._register_child_endpoint(CompanyCompaniesIdSitesEndpoint(client, parent_endpoint=self)) - self.merge = self._register_child_endpoint(CompanyCompaniesIdMergeEndpoint(client, parent_endpoint=self)) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Company]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Company]: """ Performs a GET request against the /company/companies/{id} endpoint and returns an initialized PaginatedResponse object. @@ -73,7 +118,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a GET request against the /company/companies/{id} endpoint. @@ -83,9 +130,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id} endpoint. @@ -95,9 +146,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PUT request against the /company/companies/{id} endpoint. @@ -107,9 +163,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PATCH request against the /company/companies/{id} endpoint. @@ -119,4 +179,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsCountEndpoint.py index 0b446e0b6..2e5a7cf92 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdGroupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/groups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/groups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsEndpoint.py index 181002f50..eb63e4461 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdGroupsCountEndpoint import CompanyCompaniesIdGroupsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdGroupsIdEndpoint import CompanyCompaniesIdGroupsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdGroupsCountEndpoint import ( + CompanyCompaniesIdGroupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdGroupsIdEndpoint import ( + CompanyCompaniesIdGroupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyGroup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyCompaniesIdGroupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "groups", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCompaniesIdGroupsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompaniesIdGroupsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompaniesIdGroupsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyGroup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyGroup]: """ Performs a GET request against the /company/companies/{id}/groups endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyGroup]: The parsed response data. """ - return self._parse_many(CompanyGroup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyGroup, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyGroup: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyGroup: """ Performs a POST request against the /company/companies/{id}/groups endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyGroup: The parsed response data. """ - return self._parse_one(CompanyGroup, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanyGroup, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsIdEndpoint.py index 79ab25e0b..b616adc46 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdGroupsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyGroup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyGroup: """ Performs a GET request against the /company/companies/{id}/groups/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyGroup: The parsed response data. """ - return self._parse_one(CompanyGroup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyGroup, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id}/groups/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyGroup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyGroup: """ Performs a PUT request against the /company/companies/{id}/groups/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyGroup: The parsed response data. """ - return self._parse_one(CompanyGroup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanyGroup, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyGroup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyGroup: """ Performs a PATCH request against the /company/companies/{id}/groups/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyGroup: The parsed response data. """ - return self._parse_one(CompanyGroup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CompanyGroup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsCountEndpoint.py index a6929b95a..513e30903 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdManagementreportnotificationsCountEndpoint(ConnectWiseEn def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/managementReportNotifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/managementReportNotifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsEndpoint.py index 6117ee321..c19bf72a1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportnotificationsCountEndpoint import \ - CompanyCompaniesIdManagementreportnotificationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportnotificationsIdEndpoint import \ - CompanyCompaniesIdManagementreportnotificationsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportnotificationsCountEndpoint import ( + CompanyCompaniesIdManagementreportnotificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportnotificationsIdEndpoint import ( + CompanyCompaniesIdManagementreportnotificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagementReportNotification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class CompanyCompaniesIdManagementreportnotificationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "managementReportNotifications", parent_endpoint=parent_endpoint) + super().__init__( + client, "managementReportNotifications", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - CompanyCompaniesIdManagementreportnotificationsCountEndpoint(client, parent_endpoint=self) + CompanyCompaniesIdManagementreportnotificationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyCompaniesIdManagementreportnotificationsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyCompaniesIdManagementreportnotificationsIdEndpoi Returns: CompanyCompaniesIdManagementreportnotificationsIdEndpoint: The initialized CompanyCompaniesIdManagementreportnotificationsIdEndpoint object. """ - child = CompanyCompaniesIdManagementreportnotificationsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyCompaniesIdManagementreportnotificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagementReportNotification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagementReportNotification]: """ Performs a GET request against the /company/companies/{id}/managementReportNotifications endpoint. @@ -65,10 +75,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ManagementReportNotification]: The parsed response data. """ return self._parse_many( - ManagementReportNotification, super()._make_request("GET", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportNotification: """ Performs a POST request against the /company/companies/{id}/managementReportNotifications endpoint. @@ -79,5 +92,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: The parsed response data. """ return self._parse_one( - ManagementReportNotification, super()._make_request("POST", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsIdEndpoint.py index 39f349c14..c09921521 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportNotificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportNotification: """ Performs a GET request against the /company/companies/{id}/managementReportNotifications/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M ManagementReportNotification: The parsed response data. """ return self._parse_one( - ManagementReportNotification, super()._make_request("GET", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id}/managementReportNotifications/{id} endpoint. @@ -57,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportNotification: """ Performs a PUT request against the /company/companies/{id}/managementReportNotifications/{id} endpoint. @@ -70,10 +80,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M ManagementReportNotification: The parsed response data. """ return self._parse_one( - ManagementReportNotification, super()._make_request("PUT", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportNotification: """ Performs a PATCH request against the /company/companies/{id}/managementReportNotifications/{id} endpoint. @@ -84,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: The parsed response data. """ return self._parse_one( - ManagementReportNotification, super()._make_request("PATCH", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportSetupEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportSetupEndpoint.py index 59f3fde12..1294afb1f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportSetupEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportSetupEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportsetupIdEndpoint import \ - CompanyCompaniesIdManagementreportsetupIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementreportsetupIdEndpoint import ( + CompanyCompaniesIdManagementreportsetupIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagementReportSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +11,9 @@ class CompanyCompaniesIdManagementreportsetupEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "managementReportSetup", parent_endpoint=parent_endpoint) + super().__init__( + client, "managementReportSetup", parent_endpoint=parent_endpoint + ) def id(self, id: int) -> CompanyCompaniesIdManagementreportsetupIdEndpoint: """ @@ -21,7 +24,9 @@ def id(self, id: int) -> CompanyCompaniesIdManagementreportsetupIdEndpoint: Returns: CompanyCompaniesIdManagementreportsetupIdEndpoint: The initialized CompanyCompaniesIdManagementreportsetupIdEndpoint object. """ - child = CompanyCompaniesIdManagementreportsetupIdEndpoint(self.client, parent_endpoint=self) + child = CompanyCompaniesIdManagementreportsetupIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -48,7 +53,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagementReportSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagementReportSetup]: """ Performs a GET request against the /company/companies/{id}/managementReportSetup endpoint. @@ -58,9 +65,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ManagementReportSetup]: The parsed response data. """ - return self._parse_many(ManagementReportSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ManagementReportSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportSetup: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportSetup: """ Performs a POST request against the /company/companies/{id}/managementReportSetup endpoint. @@ -70,4 +82,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ManagementReportSetup: The parsed response data. """ - return self._parse_one(ManagementReportSetup, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ManagementReportSetup, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportSetupIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportSetupIdEndpoint.py index 1fbc6696a..68178f82b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportSetupIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementReportSetupIdEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdManagementreportsetupIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportSetup: """ Performs a PUT request against the /company/companies/{id}/managementReportSetup/{id} endpoint. @@ -20,9 +22,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManagementReportSetup: The parsed response data. """ - return self._parse_one(ManagementReportSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ManagementReportSetup, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportSetup: """ Performs a PATCH request against the /company/companies/{id}/managementReportSetup/{id} endpoint. @@ -32,4 +39,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ManagementReportSetup: The parsed response data. """ - return self._parse_one(ManagementReportSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ManagementReportSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsCountEndpoint.py index 80ada512a..aeb5968fb 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdManagementsummaryreportsCountEndpoint(ConnectWiseEndpoin def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/managementSummaryReports/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/managementSummaryReports/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsEndpoint.py index 8c0998ed9..4092bb22a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementsummaryreportsCountEndpoint import \ - CompanyCompaniesIdManagementsummaryreportsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementsummaryreportsIdEndpoint import \ - CompanyCompaniesIdManagementsummaryreportsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementsummaryreportsCountEndpoint import ( + CompanyCompaniesIdManagementsummaryreportsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdManagementsummaryreportsIdEndpoint import ( + CompanyCompaniesIdManagementsummaryreportsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyManagementSummary from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class CompanyCompaniesIdManagementsummaryreportsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "managementSummaryReports", parent_endpoint=parent_endpoint) + super().__init__( + client, "managementSummaryReports", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - CompanyCompaniesIdManagementsummaryreportsCountEndpoint(client, parent_endpoint=self) + CompanyCompaniesIdManagementsummaryreportsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyCompaniesIdManagementsummaryreportsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyCompaniesIdManagementsummaryreportsIdEndpoint: Returns: CompanyCompaniesIdManagementsummaryreportsIdEndpoint: The initialized CompanyCompaniesIdManagementsummaryreportsIdEndpoint object. """ - child = CompanyCompaniesIdManagementsummaryreportsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyCompaniesIdManagementsummaryreportsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyManagementSummary]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyManagementSummary]: """ Performs a GET request against the /company/companies/{id}/managementSummaryReports endpoint. @@ -64,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyManagementSummary]: The parsed response data. """ - return self._parse_many(CompanyManagementSummary, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyManagementSummary, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyManagementSummary: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyManagementSummary: """ Performs a POST request against the /company/companies/{id}/managementSummaryReports endpoint. @@ -76,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyManagementSummary: The parsed response data. """ - return self._parse_one(CompanyManagementSummary, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanyManagementSummary, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsIdEndpoint.py index 8db8b90ac..d58f98c20 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdManagementSummaryReportsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyManagementSummary: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyManagementSummary: """ Performs a GET request against the /company/companies/{id}/managementSummaryReports/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyManagementSummary: The parsed response data. """ - return self._parse_one(CompanyManagementSummary, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyManagementSummary, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id}/managementSummaryReports/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyManagementSummary: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyManagementSummary: """ Performs a PUT request against the /company/companies/{id}/managementSummaryReports/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyManagementSummary: The parsed response data. """ - return self._parse_one(CompanyManagementSummary, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanyManagementSummary, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyManagementSummary: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyManagementSummary: """ Performs a PATCH request against the /company/companies/{id}/managementSummaryReports/{id} endpoint. @@ -80,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyManagementSummary: The parsed response data. """ return self._parse_one( - CompanyManagementSummary, super()._make_request("PATCH", data=data, params=params).json() + CompanyManagementSummary, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdMergeEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdMergeEndpoint.py index d4e8abfea..513690cfc 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdMergeEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdMergeEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdMergeEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "merge", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /company/companies/{id}/merge endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesCountEndpoint.py index c60708331..17bc18673 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdNotesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/notes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/notes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesEndpoint.py index 8f2954713..9bdbc9eb1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdNotesCountEndpoint import CompanyCompaniesIdNotesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdNotesIdEndpoint import CompanyCompaniesIdNotesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdNotesCountEndpoint import ( + CompanyCompaniesIdNotesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdNotesIdEndpoint import ( + CompanyCompaniesIdNotesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyNote from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyCompaniesIdNotesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "notes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCompaniesIdNotesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompaniesIdNotesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompaniesIdNotesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyCompaniesIdNotesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CompanyNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CompanyNote]: """ Performs a GET request against the /company/companies/{id}/notes endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyNote]: """ Performs a GET request against the /company/companies/{id}/notes endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyNote]: The parsed response data. """ - return self._parse_many(CompanyNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyNote, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyNote: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyNote: """ Performs a POST request against the /company/companies/{id}/notes endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyNote: The parsed response data. """ - return self._parse_one(CompanyNote, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanyNote, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesIdEndpoint.py index beba0b3c0..55f34a5a9 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdNotesIdEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdNotesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CompanyNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CompanyNote]: """ Performs a GET request against the /company/companies/{id}/notes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyNote: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyNote: """ Performs a GET request against the /company/companies/{id}/notes/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyNote: The parsed response data. """ - return self._parse_one(CompanyNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyNote, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id}/notes/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyNote: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyNote: """ Performs a PUT request against the /company/companies/{id}/notes/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyNote: The parsed response data. """ - return self._parse_one(CompanyNote, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanyNote, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyNote: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyNote: """ Performs a PATCH request against the /company/companies/{id}/notes/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyNote: The parsed response data. """ - return self._parse_one(CompanyNote, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CompanyNote, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesCountEndpoint.py index bd4e8ee98..4d958a972 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdSitesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/sites/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/sites/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesEndpoint.py index c801a1609..5279ec6ca 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesCountEndpoint import CompanyCompaniesIdSitesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesIdEndpoint import CompanyCompaniesIdSitesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesCountEndpoint import ( + CompanyCompaniesIdSitesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesIdEndpoint import ( + CompanyCompaniesIdSitesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanySite from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyCompaniesIdSitesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "sites", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCompaniesIdSitesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompaniesIdSitesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompaniesIdSitesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyCompaniesIdSitesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CompanySite]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CompanySite]: """ Performs a GET request against the /company/companies/{id}/sites endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanySite]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanySite]: """ Performs a GET request against the /company/companies/{id}/sites endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanySite]: The parsed response data. """ - return self._parse_many(CompanySite, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanySite, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanySite: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanySite: """ Performs a POST request against the /company/companies/{id}/sites endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanySite: The parsed response data. """ - return self._parse_one(CompanySite, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanySite, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdEndpoint.py index b8667bf4e..963ba9dd0 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesIdUsagesEndpoint import \ - CompanyCompaniesIdSitesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesIdUsagesEndpoint import ( + CompanyCompaniesIdSitesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanySite from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): CompanyCompaniesIdSitesIdUsagesEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CompanySite]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CompanySite]: """ Performs a GET request against the /company/companies/{id}/sites/{id} endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanySite: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanySite: """ Performs a GET request against the /company/companies/{id}/sites/{id} endpoint. @@ -47,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanySite: The parsed response data. """ - return self._parse_one(CompanySite, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanySite, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id}/sites/{id} endpoint. @@ -59,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanySite: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanySite: """ Performs a PUT request against the /company/companies/{id}/sites/{id} endpoint. @@ -71,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanySite: The parsed response data. """ - return self._parse_one(CompanySite, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanySite, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanySite: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanySite: """ Performs a PATCH request against the /company/companies/{id}/sites/{id} endpoint. @@ -83,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanySite: The parsed response data. """ - return self._parse_one(CompanySite, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CompanySite, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdUsagesEndpoint.py index 426c141a6..b2d13d088 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesIdUsagesListEndpoint import \ - CompanyCompaniesIdSitesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdSitesIdUsagesListEndpoint import ( + CompanyCompaniesIdSitesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): CompanyCompaniesIdSitesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/companies/{id}/sites/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/companies/{id}/sites/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdUsagesListEndpoint.py index d0336dbc8..e13780208 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSitesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdSitesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/companies/{id}/sites/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/companies/{id}/sites/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSurveysCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSurveysCountEndpoint.py index 3e0fc42c6..29c4641a5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSurveysCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSurveysCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdSurveysCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/surveys/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/surveys/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSurveysEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSurveysEndpoint.py index 6ecbb41e5..b37302ea3 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSurveysEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdSurveysEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdSurveysCountEndpoint import CompanyCompaniesIdSurveysCountEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdSurveysCountEndpoint import ( + CompanyCompaniesIdSurveysCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyCompaniesIdSurveysEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "surveys", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCompaniesIdSurveysCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompaniesIdSurveysCountEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsCountEndpoint.py index ba354e9e6..36d3c9f53 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdTeamsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/teams/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/teams/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsEndpoint.py index 0634c8149..32784b664 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdTeamsCountEndpoint import CompanyCompaniesIdTeamsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdTeamsIdEndpoint import CompanyCompaniesIdTeamsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdTeamsCountEndpoint import ( + CompanyCompaniesIdTeamsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdTeamsIdEndpoint import ( + CompanyCompaniesIdTeamsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyTeam from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyCompaniesIdTeamsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "teams", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCompaniesIdTeamsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompaniesIdTeamsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompaniesIdTeamsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyCompaniesIdTeamsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CompanyTeam]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CompanyTeam]: """ Performs a GET request against the /company/companies/{id}/teams endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyTeam]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyTeam]: """ Performs a GET request against the /company/companies/{id}/teams endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyTeam]: The parsed response data. """ - return self._parse_many(CompanyTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyTeam, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyTeam: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyTeam: """ Performs a POST request against the /company/companies/{id}/teams endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyTeam: The parsed response data. """ - return self._parse_one(CompanyTeam, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanyTeam, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsIdEndpoint.py index c1e637947..32f8454c7 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTeamsIdEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdTeamsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CompanyTeam]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CompanyTeam]: """ Performs a GET request against the /company/companies/{id}/teams/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyTeam: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyTeam: """ Performs a GET request against the /company/companies/{id}/teams/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyTeam: The parsed response data. """ - return self._parse_one(CompanyTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyTeam, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id}/teams/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyTeam: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyTeam: """ Performs a PUT request against the /company/companies/{id}/teams/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyTeam: The parsed response data. """ - return self._parse_one(CompanyTeam, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanyTeam, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyTeam: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyTeam: """ Performs a PATCH request against the /company/companies/{id}/teams/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyTeam: The parsed response data. """ - return self._parse_one(CompanyTeam, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CompanyTeam, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksCountEndpoint.py index d093bc44c..ec5a31871 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdTracksCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/tracks/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/tracks/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksEndpoint.py index bc52019de..df8e31e4e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdTracksCountEndpoint import CompanyCompaniesIdTracksCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdTracksIdEndpoint import CompanyCompaniesIdTracksIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdTracksCountEndpoint import ( + CompanyCompaniesIdTracksCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdTracksIdEndpoint import ( + CompanyCompaniesIdTracksIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactTrack from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyCompaniesIdTracksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tracks", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCompaniesIdTracksCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompaniesIdTracksCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompaniesIdTracksIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactTrack]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactTrack]: """ Performs a GET request against the /company/companies/{id}/tracks endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactTrack]: The parsed response data. """ - return self._parse_many(ContactTrack, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactTrack, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactTrack: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactTrack: """ Performs a POST request against the /company/companies/{id}/tracks endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactTrack: The parsed response data. """ - return self._parse_one(ContactTrack, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ContactTrack, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksIdEndpoint.py index 53e851b50..c3468961c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTracksIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactTrack: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactTrack: """ Performs a GET request against the /company/companies/{id}/tracks/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactTrack: The parsed response data. """ - return self._parse_one(ContactTrack, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactTrack, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id}/tracks/{id} endpoint. @@ -55,4 +61,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsCountEndpoint.py index fe512b205..c706db325 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdTypeassociationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/{id}/typeAssociations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/{id}/typeAssociations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsEndpoint.py index bfa6eacdc..4fa1a94b3 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdTypeassociationsCountEndpoint import \ - CompanyCompaniesIdTypeassociationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdTypeassociationsIdEndpoint import \ - CompanyCompaniesIdTypeassociationsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdTypeassociationsCountEndpoint import ( + CompanyCompaniesIdTypeassociationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesIdTypeassociationsIdEndpoint import ( + CompanyCompaniesIdTypeassociationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyCompanyTypeAssociation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "typeAssociations", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyCompaniesIdTypeassociationsCountEndpoint(client, parent_endpoint=self) + CompanyCompaniesIdTypeassociationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyCompaniesIdTypeassociationsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyCompaniesIdTypeassociationsIdEndpoint: Returns: CompanyCompaniesIdTypeassociationsIdEndpoint: The initialized CompanyCompaniesIdTypeassociationsIdEndpoint object. """ - child = CompanyCompaniesIdTypeassociationsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyCompaniesIdTypeassociationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyCompanyTypeAssociation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyCompanyTypeAssociation]: """ Performs a GET request against the /company/companies/{id}/typeAssociations endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[CompanyCompanyTypeAssociation]: The parsed response data. """ return self._parse_many( - CompanyCompanyTypeAssociation, super()._make_request("GET", data=data, params=params).json() + CompanyCompanyTypeAssociation, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCompanyTypeAssociation: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyCompanyTypeAssociation: """ Performs a POST request against the /company/companies/{id}/typeAssociations endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCompanyTypeAssociation: The parsed response data. """ return self._parse_one( - CompanyCompanyTypeAssociation, super()._make_request("POST", data=data, params=params).json() + CompanyCompanyTypeAssociation, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsIdEndpoint.py index ab2afc9c4..7b080aaaa 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdTypeAssociationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCompanyTypeAssociation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyCompanyTypeAssociation: """ Performs a GET request against the /company/companies/{id}/typeAssociations/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C CompanyCompanyTypeAssociation: The parsed response data. """ return self._parse_one( - CompanyCompanyTypeAssociation, super()._make_request("GET", data=data, params=params).json() + CompanyCompanyTypeAssociation, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/{id}/typeAssociations/{id} endpoint. @@ -57,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCompanyTypeAssociation: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyCompanyTypeAssociation: """ Performs a PUT request against the /company/companies/{id}/typeAssociations/{id} endpoint. @@ -70,10 +80,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C CompanyCompanyTypeAssociation: The parsed response data. """ return self._parse_one( - CompanyCompanyTypeAssociation, super()._make_request("PUT", data=data, params=params).json() + CompanyCompanyTypeAssociation, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCompanyTypeAssociation: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyCompanyTypeAssociation: """ Performs a PATCH request against the /company/companies/{id}/typeAssociations/{id} endpoint. @@ -84,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyCompanyTypeAssociation: The parsed response data. """ return self._parse_one( - CompanyCompanyTypeAssociation, super()._make_request("PATCH", data=data, params=params).json() + CompanyCompanyTypeAssociation, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdUsagesEndpoint.py index 25f15496f..458126197 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesIdUsagesListEndpoint import CompanyCompaniesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesIdUsagesListEndpoint import ( + CompanyCompaniesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyCompaniesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(CompanyCompaniesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + CompanyCompaniesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/companies/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/companies/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdUsagesListEndpoint.py index 3721ac7e1..adf7a1990 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/companies/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/companies/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoEndpoint.py index 8304718dc..6917ce2f1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesInfoTypesEndpoint import CompanyCompaniesInfoTypesEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesInfoTypesEndpoint import ( + CompanyCompaniesInfoTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyCompaniesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.types = self._register_child_endpoint(CompanyCompaniesInfoTypesEndpoint(client, parent_endpoint=self)) + self.types = self._register_child_endpoint( + CompanyCompaniesInfoTypesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesCountEndpoint.py index 2b3ca6bd6..bbce97c61 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesInfoTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/info/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/info/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesEndpoint.py index b860ba252..a98741461 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesInfoTypesCountEndpoint import CompanyCompaniesInfoTypesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesInfoTypesIdEndpoint import CompanyCompaniesInfoTypesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesInfoTypesCountEndpoint import ( + CompanyCompaniesInfoTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesInfoTypesIdEndpoint import ( + CompanyCompaniesInfoTypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyCompaniesInfoTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCompaniesInfoTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompaniesInfoTypesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompaniesInfoTypesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyTypeInfo]: """ Performs a GET request against the /company/companies/info/types endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyTypeInfo]: The parsed response data. """ - return self._parse_many(CompanyTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesIdEndpoint.py index 68343f7bf..9906a33bb 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesInfoTypesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyTypeInfo: """ Performs a GET request against the /company/companies/info/types/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyTypeInfo: The parsed response data. """ - return self._parse_one(CompanyTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesCountEndpoint.py index a87402167..2484151e6 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesStatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/statuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/statuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesEndpoint.py index 32eadc435..89d4d5910 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesCountEndpoint import CompanyCompaniesStatusesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesIdEndpoint import CompanyCompaniesStatusesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesCountEndpoint import ( + CompanyCompaniesStatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesIdEndpoint import ( + CompanyCompaniesStatusesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyCompaniesStatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "statuses", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCompaniesStatusesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompaniesStatusesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompaniesStatusesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyStatus]: """ Performs a GET request against the /company/companies/statuses endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyStatus]: The parsed response data. """ - return self._parse_many(CompanyStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyStatus, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyStatus: """ Performs a POST request against the /company/companies/statuses endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyStatus: The parsed response data. """ - return self._parse_one(CompanyStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanyStatus, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdEndpoint.py index d91fe78c3..ed2a4917f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesIdUsagesEndpoint import \ - CompanyCompaniesStatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesIdUsagesEndpoint import ( + CompanyCompaniesStatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyStatus: """ Performs a GET request against the /company/companies/statuses/{id} endpoint. @@ -49,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyStatus: The parsed response data. """ - return self._parse_one(CompanyStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyStatus, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/statuses/{id} endpoint. @@ -61,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyStatus: """ Performs a PUT request against the /company/companies/statuses/{id} endpoint. @@ -73,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyStatus: The parsed response data. """ - return self._parse_one(CompanyStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanyStatus, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyStatus: """ Performs a PATCH request against the /company/companies/statuses/{id} endpoint. @@ -85,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyStatus: The parsed response data. """ - return self._parse_one(CompanyStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CompanyStatus, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdUsagesEndpoint.py index b5b2e5cd6..342b25ecb 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesIdUsagesListEndpoint import \ - CompanyCompaniesStatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesStatusesIdUsagesListEndpoint import ( + CompanyCompaniesStatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): CompanyCompaniesStatusesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/companies/statuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/companies/statuses/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdUsagesListEndpoint.py index 849f38b59..a01130edc 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesStatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesStatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/companies/statuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/companies/statuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesCountEndpoint.py index e1328ae8e..204e9da6d 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companies/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companies/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesEndpoint.py index d7ae9cac4..2ce15b9e2 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesTypesCountEndpoint import CompanyCompaniesTypesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesTypesIdEndpoint import CompanyCompaniesTypesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesTypesCountEndpoint import ( + CompanyCompaniesTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesTypesIdEndpoint import ( + CompanyCompaniesTypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyCompaniesTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCompaniesTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompaniesTypesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompaniesTypesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyCompaniesTypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CompanyType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CompanyType]: """ Performs a GET request against the /company/companies/types endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyType]: """ Performs a GET request against the /company/companies/types endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyType]: The parsed response data. """ - return self._parse_many(CompanyType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyType: """ Performs a POST request against the /company/companies/types endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyType: The parsed response data. """ - return self._parse_one(CompanyType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanyType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdEndpoint.py index 5311b86f2..86a613578 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesTypesIdUsagesEndpoint import CompanyCompaniesTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesTypesIdUsagesEndpoint import ( + CompanyCompaniesTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyCompaniesTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.usages = self._register_child_endpoint(CompanyCompaniesTypesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + CompanyCompaniesTypesIdUsagesEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CompanyType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CompanyType]: """ Performs a GET request against the /company/companies/types/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyType: """ Performs a GET request against the /company/companies/types/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyType: The parsed response data. """ - return self._parse_one(CompanyType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companies/types/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyType: """ Performs a PUT request against the /company/companies/types/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyType: The parsed response data. """ - return self._parse_one(CompanyType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanyType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyType: """ Performs a PATCH request against the /company/companies/types/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyType: The parsed response data. """ - return self._parse_one(CompanyType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CompanyType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdUsagesEndpoint.py index 39b15e918..a4a63dcdc 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesTypesIdUsagesListEndpoint import \ - CompanyCompaniesTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyCompaniesTypesIdUsagesListEndpoint import ( + CompanyCompaniesTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): CompanyCompaniesTypesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/companies/types/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/companies/types/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdUsagesListEndpoint.py index bf17fbfc5..1bd8abbcc 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompaniesTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompaniesTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/companies/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/companies/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompanyFinanceIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompanyFinanceIdEndpoint.py index f848a237d..9857c105b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompanyFinanceIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompanyFinanceIdEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompanyfinanceIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyFinance: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyFinance: """ Performs a PUT request against the /company/companyFinance/{id} endpoint. @@ -20,4 +22,7 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyFinance: The parsed response data. """ - return self._parse_one(CompanyFinance, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanyFinance, + super()._make_request("PUT", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsClearEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsClearEndpoint.py index 35541cbe5..b0218799b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsClearEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsClearEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompanypickeritemsClearEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "clear", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ClearPickerRequest: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ClearPickerRequest: """ Performs a POST request against the /company/companyPickerItems/clear endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ClearPickerRequest: The parsed response data. """ - return self._parse_one(ClearPickerRequest, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ClearPickerRequest, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsCountEndpoint.py index 736ec4ac1..d933e67f5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompanypickeritemsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companyPickerItems/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companyPickerItems/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsEndpoint.py index 30362a974..3197a09a1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompanypickeritemsClearEndpoint import CompanyCompanypickeritemsClearEndpoint -from pyconnectwise.endpoints.manage.CompanyCompanypickeritemsCountEndpoint import CompanyCompanypickeritemsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompanypickeritemsIdEndpoint import CompanyCompanypickeritemsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompanypickeritemsClearEndpoint import ( + CompanyCompanypickeritemsClearEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompanypickeritemsCountEndpoint import ( + CompanyCompanypickeritemsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompanypickeritemsIdEndpoint import ( + CompanyCompanypickeritemsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyPickerItem from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyCompanypickeritemsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "companyPickerItems", parent_endpoint=parent_endpoint) - self.clear = self._register_child_endpoint(CompanyCompanypickeritemsClearEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyCompanypickeritemsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCompanypickeritemsCountEndpoint(client, parent_endpoint=self) + ) + self.clear = self._register_child_endpoint( + CompanyCompanypickeritemsClearEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCompanypickeritemsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyPickerItem]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyPickerItem]: """ Performs a GET request against the /company/companyPickerItems endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyPickerItem]: The parsed response data. """ - return self._parse_many(CompanyPickerItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyPickerItem, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyPickerItem: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyPickerItem: """ Performs a POST request against the /company/companyPickerItems endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyPickerItem: The parsed response data. """ - return self._parse_one(CompanyPickerItem, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanyPickerItem, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsIdEndpoint.py index 89777ed9d..3d9615f32 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompanyPickerItemsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyPickerItem: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyPickerItem: """ Performs a GET request against the /company/companyPickerItems/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyPickerItem: The parsed response data. """ - return self._parse_one(CompanyPickerItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyPickerItem, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companyPickerItems/{id} endpoint. @@ -55,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsCountEndpoint.py index c924fd8ff..781973c6b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompanytypeassociationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/companyTypeAssociations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/companyTypeAssociations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsEndpoint.py index 3f70b1675..70b53ebe8 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompanytypeassociationsCountEndpoint import \ - CompanyCompanytypeassociationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCompanytypeassociationsIdEndpoint import \ - CompanyCompanytypeassociationsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompanytypeassociationsCountEndpoint import ( + CompanyCompanytypeassociationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompanytypeassociationsIdEndpoint import ( + CompanyCompanytypeassociationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Company from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class CompanyCompanytypeassociationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "companyTypeAssociations", parent_endpoint=parent_endpoint) + super().__init__( + client, "companyTypeAssociations", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( CompanyCompanytypeassociationsCountEndpoint(client, parent_endpoint=self) @@ -27,11 +31,15 @@ def id(self, id: int) -> CompanyCompanytypeassociationsIdEndpoint: Returns: CompanyCompanytypeassociationsIdEndpoint: The initialized CompanyCompanytypeassociationsIdEndpoint object. """ - child = CompanyCompanytypeassociationsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyCompanytypeassociationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Company]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Company]: """ Performs a GET request against the /company/companyTypeAssociations endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +60,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Company]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Company]: """ Performs a GET request against the /company/companyTypeAssociations endpoint. @@ -62,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Company]: The parsed response data. """ - return self._parse_many(Company, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Company, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a POST request against the /company/companyTypeAssociations endpoint. @@ -74,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsIdEndpoint.py index 042261d7e..1b47177d2 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompanyTypeAssociationsIdEndpoint.py @@ -10,7 +10,9 @@ class CompanyCompanytypeassociationsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Company]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Company]: """ Performs a GET request against the /company/companyTypeAssociations/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a GET request against the /company/companyTypeAssociations/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/companyTypeAssociations/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PUT request against the /company/companyTypeAssociations/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PATCH request against the /company/companyTypeAssociations/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCompanyfinanceEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCompanyfinanceEndpoint.py index 939d5440e..27225b586 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCompanyfinanceEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCompanyfinanceEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCompanyfinanceIdEndpoint import CompanyCompanyfinanceIdEndpoint +from pyconnectwise.endpoints.manage.CompanyCompanyfinanceIdEndpoint import ( + CompanyCompanyfinanceIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsBulkEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsBulkEndpoint.py index a166f2132..bb37cb4f5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsBulkEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsBulkEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsBulkEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "bulk", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a POST request against the /company/configurations/bulk endpoint. @@ -20,9 +22,13 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("POST", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BulkResult: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BulkResult: """ Performs a DELETE request against the /company/configurations/bulk endpoint. @@ -32,9 +38,13 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: BulkResult: The parsed response data. """ - return self._parse_one(BulkResult, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + BulkResult, super()._make_request("DELETE", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PUT request against the /company/configurations/bulk endpoint. @@ -44,4 +54,6 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PUT", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsCountEndpoint.py index 46b4fbc1e..ab0782a8d 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/configurations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/configurations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsEndpoint.py index 39ed98724..07165cb6c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsEndpoint.py @@ -1,11 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsBulkEndpoint import CompanyConfigurationsBulkEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsCountEndpoint import CompanyConfigurationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsIdEndpoint import CompanyConfigurationsIdEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesEndpoint import CompanyConfigurationsStatusesEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesEndpoint import CompanyConfigurationsTypesEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsBulkEndpoint import ( + CompanyConfigurationsBulkEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsCountEndpoint import ( + CompanyConfigurationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsIdEndpoint import ( + CompanyConfigurationsIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesEndpoint import ( + CompanyConfigurationsStatusesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesEndpoint import ( + CompanyConfigurationsTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Company from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,9 +25,15 @@ class CompanyConfigurationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "configurations", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyConfigurationsCountEndpoint(client, parent_endpoint=self)) - self.bulk = self._register_child_endpoint(CompanyConfigurationsBulkEndpoint(client, parent_endpoint=self)) - self.types = self._register_child_endpoint(CompanyConfigurationsTypesEndpoint(client, parent_endpoint=self)) + self.bulk = self._register_child_endpoint( + CompanyConfigurationsBulkEndpoint(client, parent_endpoint=self) + ) + self.types = self._register_child_endpoint( + CompanyConfigurationsTypesEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + CompanyConfigurationsCountEndpoint(client, parent_endpoint=self) + ) self.statuses = self._register_child_endpoint( CompanyConfigurationsStatusesEndpoint(client, parent_endpoint=self) ) @@ -35,7 +51,9 @@ def id(self, id: int) -> CompanyConfigurationsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Company]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Company]: """ Performs a GET request against the /company/configurations endpoint and returns an initialized PaginatedResponse object. @@ -56,7 +74,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Company]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Company]: """ Performs a GET request against the /company/configurations endpoint. @@ -66,9 +86,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Company]: The parsed response data. """ - return self._parse_many(Company, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Company, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a POST request against the /company/configurations endpoint. @@ -78,4 +102,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsIdChangeTypeEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsIdChangeTypeEndpoint.py index e28fc4404..c19c8df5b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsIdChangeTypeEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsIdChangeTypeEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsIdChangetypeEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "changeType", parent_endpoint=parent_endpoint) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PATCH request against the /company/configurations/{id}/changeType endpoint. @@ -20,4 +22,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsIdEndpoint.py index 3cf64aea5..bd374c558 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsIdChangetypeEndpoint import \ - CompanyConfigurationsIdChangetypeEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsIdChangetypeEndpoint import ( + CompanyConfigurationsIdChangetypeEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Company from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): CompanyConfigurationsIdChangetypeEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Company]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Company]: """ Performs a GET request against the /company/configurations/{id} endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a GET request against the /company/configurations/{id} endpoint. @@ -47,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/configurations/{id} endpoint. @@ -59,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PUT request against the /company/configurations/{id} endpoint. @@ -71,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PATCH request against the /company/configurations/{id} endpoint. @@ -83,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesCountEndpoint.py index 147b94173..50252bc3e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsStatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/configurations/statuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/configurations/statuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesEndpoint.py index 65a67e326..96d9ccd23 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesCountEndpoint import \ - CompanyConfigurationsStatusesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesIdEndpoint import \ - CompanyConfigurationsStatusesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesInfoEndpoint import \ - CompanyConfigurationsStatusesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesCountEndpoint import ( + CompanyConfigurationsStatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesIdEndpoint import ( + CompanyConfigurationsStatusesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesInfoEndpoint import ( + CompanyConfigurationsStatusesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,12 +19,12 @@ class CompanyConfigurationsStatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "statuses", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - CompanyConfigurationsStatusesInfoEndpoint(client, parent_endpoint=self) - ) self.count = self._register_child_endpoint( CompanyConfigurationsStatusesCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + CompanyConfigurationsStatusesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyConfigurationsStatusesIdEndpoint: """ @@ -32,7 +35,9 @@ def id(self, id: int) -> CompanyConfigurationsStatusesIdEndpoint: Returns: CompanyConfigurationsStatusesIdEndpoint: The initialized CompanyConfigurationsStatusesIdEndpoint object. """ - child = CompanyConfigurationsStatusesIdEndpoint(self.client, parent_endpoint=self) + child = CompanyConfigurationsStatusesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -59,7 +64,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationStatus]: """ Performs a GET request against the /company/configurations/statuses endpoint. @@ -69,9 +76,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ConfigurationStatus]: The parsed response data. """ - return self._parse_many(ConfigurationStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ConfigurationStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationStatus: """ Performs a POST request against the /company/configurations/statuses endpoint. @@ -81,4 +93,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConfigurationStatus: The parsed response data. """ - return self._parse_one(ConfigurationStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ConfigurationStatus, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdEndpoint.py index 237e9dfba..45ff78bf6 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesIdInfoEndpoint import \ - CompanyConfigurationsStatusesIdInfoEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesIdUsagesEndpoint import \ - CompanyConfigurationsStatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesIdInfoEndpoint import ( + CompanyConfigurationsStatusesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesIdUsagesEndpoint import ( + CompanyConfigurationsStatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,12 +16,12 @@ class CompanyConfigurationsStatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - CompanyConfigurationsStatusesIdInfoEndpoint(client, parent_endpoint=self) - ) self.usages = self._register_child_endpoint( CompanyConfigurationsStatusesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + CompanyConfigurationsStatusesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -44,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationStatus: """ Performs a GET request against the /company/configurations/statuses/{id} endpoint. @@ -54,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationStatus: The parsed response data. """ - return self._parse_one(ConfigurationStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConfigurationStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/configurations/statuses/{id} endpoint. @@ -66,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationStatus: """ Performs a PUT request against the /company/configurations/statuses/{id} endpoint. @@ -78,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationStatus: The parsed response data. """ - return self._parse_one(ConfigurationStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ConfigurationStatus, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationStatus: """ Performs a PATCH request against the /company/configurations/statuses/{id} endpoint. @@ -90,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConfigurationStatus: The parsed response data. """ - return self._parse_one(ConfigurationStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ConfigurationStatus, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdInfoEndpoint.py index 552e83016..897e2327d 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationStatusInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationStatusInfo: """ Performs a GET request against the /company/configurations/statuses/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationStatusInfo: The parsed response data. """ - return self._parse_one(ConfigurationStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConfigurationStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdUsagesEndpoint.py index 993bcdea6..09a05a393 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesIdUsagesListEndpoint import \ - CompanyConfigurationsStatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesIdUsagesListEndpoint import ( + CompanyConfigurationsStatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +14,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) self.list = self._register_child_endpoint( - CompanyConfigurationsStatusesIdUsagesListEndpoint(client, parent_endpoint=self) + CompanyConfigurationsStatusesIdUsagesListEndpoint( + client, parent_endpoint=self + ) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/configurations/statuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +42,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/configurations/statuses/{id}/usages endpoint. @@ -47,4 +54,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdUsagesListEndpoint.py index 9cb13921d..8cfd23c6b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsStatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/configurations/statuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/configurations/statuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesInfoCountEndpoint.py index 061c3c459..a1e40686b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsStatusesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/configurations/statuses/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/configurations/statuses/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesInfoEndpoint.py index 5d94f5793..7de33f969 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsStatusesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesInfoCountEndpoint import \ - CompanyConfigurationsStatusesInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsStatusesInfoCountEndpoint import ( + CompanyConfigurationsStatusesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationStatusInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationStatusInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationStatusInfo]: """ Performs a GET request against the /company/configurations/statuses/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ConfigurationStatusInfo]: The parsed response data. """ - return self._parse_many(ConfigurationStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ConfigurationStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesCopyEndpoint.py index b514e6c3a..ac01efba8 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesCopyEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsTypesCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationType: """ Performs a POST request against the /company/configurations/types/copy endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConfigurationType: The parsed response data. """ - return self._parse_one(ConfigurationType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ConfigurationType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesCountEndpoint.py index 7bf129b41..d98b91dd8 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/configurations/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/configurations/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesEndpoint.py index da8191015..d691e2354 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesEndpoint.py @@ -1,10 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesCopyEndpoint import CompanyConfigurationsTypesCopyEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesCountEndpoint import \ - CompanyConfigurationsTypesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdEndpoint import CompanyConfigurationsTypesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesCopyEndpoint import ( + CompanyConfigurationsTypesCopyEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesCountEndpoint import ( + CompanyConfigurationsTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdEndpoint import ( + CompanyConfigurationsTypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,10 +19,12 @@ class CompanyConfigurationsTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.copy = self._register_child_endpoint(CompanyConfigurationsTypesCopyEndpoint(client, parent_endpoint=self)) self.count = self._register_child_endpoint( CompanyConfigurationsTypesCountEndpoint(client, parent_endpoint=self) ) + self.copy = self._register_child_endpoint( + CompanyConfigurationsTypesCopyEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyConfigurationsTypesIdEndpoint: """ @@ -55,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationType]: """ Performs a GET request against the /company/configurations/types endpoint. @@ -65,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ConfigurationType]: The parsed response data. """ - return self._parse_many(ConfigurationType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ConfigurationType, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationType: """ Performs a POST request against the /company/configurations/types endpoint. @@ -77,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConfigurationType: The parsed response data. """ - return self._parse_one(ConfigurationType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ConfigurationType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdEndpoint.py index a18c36a64..f931fa7c5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdInfoEndpoint import \ - CompanyConfigurationsTypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsEndpoint import \ - CompanyConfigurationsTypesIdQuestionsEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdUsagesEndpoint import \ - CompanyConfigurationsTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdInfoEndpoint import ( + CompanyConfigurationsTypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsEndpoint import ( + CompanyConfigurationsTypesIdQuestionsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdUsagesEndpoint import ( + CompanyConfigurationsTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,15 +19,15 @@ class CompanyConfigurationsTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - CompanyConfigurationsTypesIdInfoEndpoint(client, parent_endpoint=self) - ) self.usages = self._register_child_endpoint( CompanyConfigurationsTypesIdUsagesEndpoint(client, parent_endpoint=self) ) self.questions = self._register_child_endpoint( CompanyConfigurationsTypesIdQuestionsEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + CompanyConfigurationsTypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -49,7 +52,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationType: """ Performs a GET request against the /company/configurations/types/{id} endpoint. @@ -59,9 +64,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationType: The parsed response data. """ - return self._parse_one(ConfigurationType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConfigurationType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/configurations/types/{id} endpoint. @@ -71,9 +81,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationType: """ Performs a PUT request against the /company/configurations/types/{id} endpoint. @@ -83,9 +98,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationType: The parsed response data. """ - return self._parse_one(ConfigurationType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ConfigurationType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationType: """ Performs a PATCH request against the /company/configurations/types/{id} endpoint. @@ -95,4 +115,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConfigurationType: The parsed response data. """ - return self._parse_one(ConfigurationType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ConfigurationType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdInfoEndpoint.py index 3f7e9695d..deb8735bf 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeInfo: """ Performs a GET request against the /company/configurations/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationTypeInfo: The parsed response data. """ - return self._parse_one(ConfigurationTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConfigurationTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsCountEndpoint.py index d99c91858..e47c5ae41 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsTypesIdQuestionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/configurations/types/{id}/questions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/configurations/types/{id}/questions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsEndpoint.py index 436437419..05b9989ab 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsCountEndpoint import \ - CompanyConfigurationsTypesIdQuestionsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdEndpoint import \ - CompanyConfigurationsTypesIdQuestionsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsCountEndpoint import ( + CompanyConfigurationsTypesIdQuestionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdEndpoint import ( + CompanyConfigurationsTypesIdQuestionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationTypeQuestion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "questions", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyConfigurationsTypesIdQuestionsCountEndpoint(client, parent_endpoint=self) + CompanyConfigurationsTypesIdQuestionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyConfigurationsTypesIdQuestionsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyConfigurationsTypesIdQuestionsIdEndpoint: Returns: CompanyConfigurationsTypesIdQuestionsIdEndpoint: The initialized CompanyConfigurationsTypesIdQuestionsIdEndpoint object. """ - child = CompanyConfigurationsTypesIdQuestionsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyConfigurationsTypesIdQuestionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationTypeQuestion]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationTypeQuestion]: """ Performs a GET request against the /company/configurations/types/{id}/questions endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ConfigurationTypeQuestion]: The parsed response data. """ return self._parse_many( - ConfigurationTypeQuestion, super()._make_request("GET", data=data, params=params).json() + ConfigurationTypeQuestion, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestion: """ Performs a POST request against the /company/configurations/types/{id}/questions endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestion: The parsed response data. """ return self._parse_one( - ConfigurationTypeQuestion, super()._make_request("POST", data=data, params=params).json() + ConfigurationTypeQuestion, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdEndpoint.py index fcee4ef39..01b33764c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint import \ - CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint import ( + CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationTypeQuestion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.values = self._register_child_endpoint( - CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint(client, parent_endpoint=self) + CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestion: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestion: """ Performs a GET request against the /company/configurations/types/{id}/questions/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationTypeQuestion: The parsed response data. """ - return self._parse_one(ConfigurationTypeQuestion, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConfigurationTypeQuestion, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/configurations/types/{id}/questions/{id} endpoint. @@ -61,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestion: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestion: """ Performs a PUT request against the /company/configurations/types/{id}/questions/{id} endpoint. @@ -73,9 +88,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationTypeQuestion: The parsed response data. """ - return self._parse_one(ConfigurationTypeQuestion, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ConfigurationTypeQuestion, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestion: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestion: """ Performs a PATCH request against the /company/configurations/types/{id}/questions/{id} endpoint. @@ -86,5 +106,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestion: The parsed response data. """ return self._parse_one( - ConfigurationTypeQuestion, super()._make_request("PATCH", data=data, params=params).json() + ConfigurationTypeQuestion, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint.py index 6150ddb67..08c2dbf54 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint(ConnectWiseEndp def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/configurations/types/{id}/questions/{id}/values/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/configurations/types/{id}/questions/{id}/values/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint.py index 9a56b37da..6bcbf368f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint import \ - CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint import \ - CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint import ( + CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint import ( + CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationTypeQuestionValue from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "values", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint(client, parent_endpoint=self) + CompanyConfigurationsTypesIdQuestionsIdValuesCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint Returns: CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint: The initialized CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint object. """ - child = CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint(self.client, parent_endpoint=self) + child = CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationTypeQuestionValue]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationTypeQuestionValue]: """ Performs a GET request against the /company/configurations/types/{id}/questions/{id}/values endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ConfigurationTypeQuestionValue]: The parsed response data. """ return self._parse_many( - ConfigurationTypeQuestionValue, super()._make_request("GET", data=data, params=params).json() + ConfigurationTypeQuestionValue, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestionValue: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestionValue: """ Performs a POST request against the /company/configurations/types/{id}/questions/{id}/values endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestionValue: The parsed response data. """ return self._parse_one( - ConfigurationTypeQuestionValue, super()._make_request("POST", data=data, params=params).json() + ConfigurationTypeQuestionValue, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint.py index ef153df17..3e3b6f87d 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint import \ - CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint import ( + CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationTypeQuestionValue from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.usages = self._register_child_endpoint( - CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint(client, parent_endpoint=self) + CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestionValue: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestionValue: """ Performs a GET request against the /company/configurations/types/{id}/questions/{id}/values/{id} endpoint. @@ -50,10 +55,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C ConfigurationTypeQuestionValue: The parsed response data. """ return self._parse_one( - ConfigurationTypeQuestionValue, super()._make_request("GET", data=data, params=params).json() + ConfigurationTypeQuestionValue, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/configurations/types/{id}/questions/{id}/values/{id} endpoint. @@ -63,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestionValue: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestionValue: """ Performs a PUT request against the /company/configurations/types/{id}/questions/{id}/values/{id} endpoint. @@ -76,10 +89,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C ConfigurationTypeQuestionValue: The parsed response data. """ return self._parse_one( - ConfigurationTypeQuestionValue, super()._make_request("PUT", data=data, params=params).json() + ConfigurationTypeQuestionValue, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestionValue: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestionValue: """ Performs a PATCH request against the /company/configurations/types/{id}/questions/{id}/values/{id} endpoint. @@ -90,5 +106,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestionValue: The parsed response data. """ return self._parse_one( - ConfigurationTypeQuestionValue, super()._make_request("PATCH", data=data, params=params).json() + ConfigurationTypeQuestionValue, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint.py index 6ab9f2802..9405125da 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint.py @@ -1,22 +1,29 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint import \ - CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint import ( + CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint(ConnectWiseEndpoint): +class CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) self.list = self._register_child_endpoint( - CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint(client, parent_endpoint=self) + CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint( + client, parent_endpoint=self + ) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/configurations/types/{id}/questions/{id}/values/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +44,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/configurations/types/{id}/questions/{id}/values/{id}/usages endpoint. @@ -47,4 +56,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint.py index 41f628c87..d8d25a670 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint(ConnectWiseEndpoint): +class CompanyConfigurationsTypesIdQuestionsIdValuesIdUsagesListEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/configurations/types/{id}/questions/{id}/values/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/configurations/types/{id}/questions/{id}/values/{id}/usages/list endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdUsagesEndpoint.py index 6c2fdc1de..276e8b1c8 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdUsagesListEndpoint import \ - CompanyConfigurationsTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyConfigurationsTypesIdUsagesListEndpoint import ( + CompanyConfigurationsTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): CompanyConfigurationsTypesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/configurations/types/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/configurations/types/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdUsagesListEndpoint.py index 456f2b169..313f14108 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyConfigurationsTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyConfigurationsTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/configurations/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/configurations/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactEndpoint.py index e23406488..5aa0b67ec 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactTypesEndpoint import CompanyContactTypesEndpoint +from pyconnectwise.endpoints.manage.CompanyContactTypesEndpoint import ( + CompanyContactTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyContactEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "contact", parent_endpoint=parent_endpoint) - self.types = self._register_child_endpoint(CompanyContactTypesEndpoint(client, parent_endpoint=self)) + self.types = self._register_child_endpoint( + CompanyContactTypesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsCountEndpoint.py index f2cf375d8..e027919d5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContacttypeassociationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contactTypeAssociations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contactTypeAssociations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsEndpoint.py index fcbef4534..8ba6e594d 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContacttypeassociationsCountEndpoint import \ - CompanyContacttypeassociationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContacttypeassociationsIdEndpoint import \ - CompanyContacttypeassociationsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContacttypeassociationsCountEndpoint import ( + CompanyContacttypeassociationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContacttypeassociationsIdEndpoint import ( + CompanyContacttypeassociationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Company from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class CompanyContacttypeassociationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "contactTypeAssociations", parent_endpoint=parent_endpoint) + super().__init__( + client, "contactTypeAssociations", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( CompanyContacttypeassociationsCountEndpoint(client, parent_endpoint=self) @@ -27,11 +31,15 @@ def id(self, id: int) -> CompanyContacttypeassociationsIdEndpoint: Returns: CompanyContacttypeassociationsIdEndpoint: The initialized CompanyContacttypeassociationsIdEndpoint object. """ - child = CompanyContacttypeassociationsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyContacttypeassociationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Company]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Company]: """ Performs a GET request against the /company/contactTypeAssociations endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +60,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Company]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Company]: """ Performs a GET request against the /company/contactTypeAssociations endpoint. @@ -62,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Company]: The parsed response data. """ - return self._parse_many(Company, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Company, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a POST request against the /company/contactTypeAssociations endpoint. @@ -74,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsIdEndpoint.py index e4e0ecbce..799603416 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactTypeAssociationsIdEndpoint.py @@ -10,7 +10,9 @@ class CompanyContacttypeassociationsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Company]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Company]: """ Performs a GET request against the /company/contactTypeAssociations/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a GET request against the /company/contactTypeAssociations/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contactTypeAssociations/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PUT request against the /company/contactTypeAssociations/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Company: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Company: """ Performs a PATCH request against the /company/contactTypeAssociations/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Company: The parsed response data. """ - return self._parse_one(Company, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Company, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactTypesEndpoint.py index e30003bcb..70989c28f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactTypesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactTypesIdEndpoint import CompanyContactTypesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContactTypesIdEndpoint import ( + CompanyContactTypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdEndpoint.py index c1a7a3b58..f9be34ece 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactTypesIdUsagesEndpoint import CompanyContactTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyContactTypesIdUsagesEndpoint import ( + CompanyContactTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyContactTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.usages = self._register_child_endpoint(CompanyContactTypesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + CompanyContactTypesIdUsagesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdUsagesEndpoint.py index 9efac2d78..0e603ff70 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactTypesIdUsagesListEndpoint import \ - CompanyContactTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyContactTypesIdUsagesListEndpoint import ( + CompanyContactTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,4 +12,6 @@ class CompanyContactTypesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(CompanyContactTypesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + CompanyContactTypesIdUsagesListEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdUsagesListEndpoint.py index 07188172a..99ed1a0fe 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/contact/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/contact/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsCountEndpoint.py index 2df38ab09..531fdad3e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsDefaultEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsDefaultEndpoint.py index d8ad7a3df..0e58b123a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsDefaultEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsDefaultEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsDefaultEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "default", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Contact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Contact]: """ Performs a GET request against the /company/contacts/default endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Contact: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Contact: """ Performs a GET request against the /company/contacts/default endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Contact: The parsed response data. """ - return self._parse_one(Contact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Contact, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsCountEndpoint.py index 976514304..600fc3ca4 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsDepartmentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/departments/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/departments/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsEndpoint.py index 06e1adccd..5703c0bda 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsEndpoint.py @@ -1,10 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsCountEndpoint import \ - CompanyContactsDepartmentsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsIdEndpoint import CompanyContactsDepartmentsIdEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsInfoEndpoint import CompanyContactsDepartmentsInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsCountEndpoint import ( + CompanyContactsDepartmentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsIdEndpoint import ( + CompanyContactsDepartmentsIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsInfoEndpoint import ( + CompanyContactsDepartmentsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactDepartment from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,10 +19,12 @@ class CompanyContactsDepartmentsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "departments", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyContactsDepartmentsInfoEndpoint(client, parent_endpoint=self)) self.count = self._register_child_endpoint( CompanyContactsDepartmentsCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + CompanyContactsDepartmentsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyContactsDepartmentsIdEndpoint: """ @@ -55,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactDepartment]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactDepartment]: """ Performs a GET request against the /company/contacts/departments endpoint. @@ -65,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactDepartment]: The parsed response data. """ - return self._parse_many(ContactDepartment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactDepartment, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactDepartment: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactDepartment: """ Performs a POST request against the /company/contacts/departments endpoint. @@ -77,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactDepartment: The parsed response data. """ - return self._parse_one(ContactDepartment, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ContactDepartment, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdEndpoint.py index 76a3d62a1..1859fafb5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsIdInfoEndpoint import \ - CompanyContactsDepartmentsIdInfoEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsIdUsagesEndpoint import \ - CompanyContactsDepartmentsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsIdInfoEndpoint import ( + CompanyContactsDepartmentsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsIdUsagesEndpoint import ( + CompanyContactsDepartmentsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactDepartment from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,12 +16,12 @@ class CompanyContactsDepartmentsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - CompanyContactsDepartmentsIdInfoEndpoint(client, parent_endpoint=self) - ) self.usages = self._register_child_endpoint( CompanyContactsDepartmentsIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + CompanyContactsDepartmentsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -44,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactDepartment: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactDepartment: """ Performs a GET request against the /company/contacts/departments/{id} endpoint. @@ -54,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactDepartment: The parsed response data. """ - return self._parse_one(ContactDepartment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactDepartment, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contacts/departments/{id} endpoint. @@ -66,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactDepartment: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactDepartment: """ Performs a PUT request against the /company/contacts/departments/{id} endpoint. @@ -78,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactDepartment: The parsed response data. """ - return self._parse_one(ContactDepartment, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ContactDepartment, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactDepartment: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactDepartment: """ Performs a PATCH request against the /company/contacts/departments/{id} endpoint. @@ -90,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactDepartment: The parsed response data. """ - return self._parse_one(ContactDepartment, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ContactDepartment, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdInfoEndpoint.py index 1b86146bb..173a24a65 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactDepartmentInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactDepartmentInfo: """ Performs a GET request against the /company/contacts/departments/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactDepartmentInfo: The parsed response data. """ - return self._parse_one(ContactDepartmentInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactDepartmentInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdUsagesEndpoint.py index b6ec3ebc8..c224bb933 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsIdUsagesListEndpoint import \ - CompanyContactsDepartmentsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsIdUsagesListEndpoint import ( + CompanyContactsDepartmentsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): CompanyContactsDepartmentsIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/contacts/departments/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/contacts/departments/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdUsagesListEndpoint.py index 08204faf2..cccba99a0 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsDepartmentsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/contacts/departments/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/contacts/departments/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsInfoCountEndpoint.py index b6e2b85df..244835865 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsDepartmentsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/departments/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/departments/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsInfoEndpoint.py index f60d6c713..31635b2b4 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsDepartmentsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsInfoCountEndpoint import \ - CompanyContactsDepartmentsInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsInfoCountEndpoint import ( + CompanyContactsDepartmentsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactDepartmentInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactDepartmentInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactDepartmentInfo]: """ Performs a GET request against the /company/contacts/departments/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactDepartmentInfo]: The parsed response data. """ - return self._parse_many(ContactDepartmentInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactDepartmentInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsEndpoint.py index e2e4be6ba..fa83c9dec 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsEndpoint.py @@ -1,15 +1,30 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsCountEndpoint import CompanyContactsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsDefaultEndpoint import CompanyContactsDefaultEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsEndpoint import CompanyContactsDepartmentsEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdEndpoint import CompanyContactsIdEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsRelationshipsEndpoint import CompanyContactsRelationshipsEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsRequestpasswordEndpoint import CompanyContactsRequestpasswordEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsTypesEndpoint import CompanyContactsTypesEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsValidateportalcredentialsEndpoint import \ - CompanyContactsValidateportalcredentialsEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsCountEndpoint import ( + CompanyContactsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsDefaultEndpoint import ( + CompanyContactsDefaultEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsDepartmentsEndpoint import ( + CompanyContactsDepartmentsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdEndpoint import ( + CompanyContactsIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsRelationshipsEndpoint import ( + CompanyContactsRelationshipsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsRequestpasswordEndpoint import ( + CompanyContactsRequestpasswordEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsTypesEndpoint import ( + CompanyContactsTypesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsValidateportalcredentialsEndpoint import ( + CompanyContactsValidateportalcredentialsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Contact from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -19,21 +34,29 @@ class CompanyContactsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "contacts", parent_endpoint=parent_endpoint) - self.departments = self._register_child_endpoint( - CompanyContactsDepartmentsEndpoint(client, parent_endpoint=self) - ) self.request_password = self._register_child_endpoint( CompanyContactsRequestpasswordEndpoint(client, parent_endpoint=self) ) - self.count = self._register_child_endpoint(CompanyContactsCountEndpoint(client, parent_endpoint=self)) - self.default = self._register_child_endpoint(CompanyContactsDefaultEndpoint(client, parent_endpoint=self)) - self.types = self._register_child_endpoint(CompanyContactsTypesEndpoint(client, parent_endpoint=self)) + self.default = self._register_child_endpoint( + CompanyContactsDefaultEndpoint(client, parent_endpoint=self) + ) self.validate_portal_credentials = self._register_child_endpoint( - CompanyContactsValidateportalcredentialsEndpoint(client, parent_endpoint=self) + CompanyContactsValidateportalcredentialsEndpoint( + client, parent_endpoint=self + ) + ) + self.departments = self._register_child_endpoint( + CompanyContactsDepartmentsEndpoint(client, parent_endpoint=self) ) self.relationships = self._register_child_endpoint( CompanyContactsRelationshipsEndpoint(client, parent_endpoint=self) ) + self.types = self._register_child_endpoint( + CompanyContactsTypesEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + CompanyContactsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyContactsIdEndpoint: """ @@ -48,7 +71,9 @@ def id(self, id: int) -> CompanyContactsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Contact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Contact]: """ Performs a GET request against the /company/contacts endpoint and returns an initialized PaginatedResponse object. @@ -69,7 +94,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Contact]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Contact]: """ Performs a GET request against the /company/contacts endpoint. @@ -79,9 +106,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Contact]: The parsed response data. """ - return self._parse_many(Contact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Contact, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Contact: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Contact: """ Performs a POST request against the /company/contacts endpoint. @@ -91,4 +122,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Contact: The parsed response data. """ - return self._parse_one(Contact, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Contact, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsCountEndpoint.py index 690030925..687a70550 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsIdCommunicationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/{id}/communications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/{id}/communications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsEndpoint.py index 615c71c77..a75c225b8 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdCommunicationsCountEndpoint import \ - CompanyContactsIdCommunicationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdCommunicationsIdEndpoint import \ - CompanyContactsIdCommunicationsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsIdCommunicationsCountEndpoint import ( + CompanyContactsIdCommunicationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdCommunicationsIdEndpoint import ( + CompanyContactsIdCommunicationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactCommunication from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> CompanyContactsIdCommunicationsIdEndpoint: Returns: CompanyContactsIdCommunicationsIdEndpoint: The initialized CompanyContactsIdCommunicationsIdEndpoint object. """ - child = CompanyContactsIdCommunicationsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyContactsIdCommunicationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactCommunication]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactCommunication]: """ Performs a GET request against the /company/contacts/{id}/communications endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactCommunication]: The parsed response data. """ - return self._parse_many(ContactCommunication, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactCommunication, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactCommunication: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactCommunication: """ Performs a POST request against the /company/contacts/{id}/communications endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactCommunication: The parsed response data. """ - return self._parse_one(ContactCommunication, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ContactCommunication, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsIdEndpoint.py index f804fd5a0..fc4b4fbf6 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdCommunicationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactCommunication: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactCommunication: """ Performs a GET request against the /company/contacts/{id}/communications/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactCommunication: The parsed response data. """ - return self._parse_one(ContactCommunication, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactCommunication, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contacts/{id}/communications/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactCommunication: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactCommunication: """ Performs a PUT request against the /company/contacts/{id}/communications/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactCommunication: The parsed response data. """ - return self._parse_one(ContactCommunication, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ContactCommunication, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactCommunication: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactCommunication: """ Performs a PATCH request against the /company/contacts/{id}/communications/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactCommunication: The parsed response data. """ - return self._parse_one(ContactCommunication, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ContactCommunication, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdEndpoint.py index d6a2328c2..0c5ce98d1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdEndpoint.py @@ -1,17 +1,30 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdCommunicationsEndpoint import \ - CompanyContactsIdCommunicationsEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdGroupsEndpoint import CompanyContactsIdGroupsEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdImageEndpoint import CompanyContactsIdImageEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdNotesEndpoint import CompanyContactsIdNotesEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdPortalsecurityEndpoint import \ - CompanyContactsIdPortalsecurityEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdTracksEndpoint import CompanyContactsIdTracksEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdTypeassociationsEndpoint import \ - CompanyContactsIdTypeassociationsEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdUsagesEndpoint import CompanyContactsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsIdCommunicationsEndpoint import ( + CompanyContactsIdCommunicationsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdGroupsEndpoint import ( + CompanyContactsIdGroupsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdImageEndpoint import ( + CompanyContactsIdImageEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdNotesEndpoint import ( + CompanyContactsIdNotesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdPortalsecurityEndpoint import ( + CompanyContactsIdPortalsecurityEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdTracksEndpoint import ( + CompanyContactsIdTracksEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdTypeassociationsEndpoint import ( + CompanyContactsIdTypeassociationsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdUsagesEndpoint import ( + CompanyContactsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Contact from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,22 +34,34 @@ class CompanyContactsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) + self.notes = self._register_child_endpoint( + CompanyContactsIdNotesEndpoint(client, parent_endpoint=self) + ) + self.tracks = self._register_child_endpoint( + CompanyContactsIdTracksEndpoint(client, parent_endpoint=self) + ) + self.usages = self._register_child_endpoint( + CompanyContactsIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.groups = self._register_child_endpoint( + CompanyContactsIdGroupsEndpoint(client, parent_endpoint=self) + ) self.type_associations = self._register_child_endpoint( CompanyContactsIdTypeassociationsEndpoint(client, parent_endpoint=self) ) - self.tracks = self._register_child_endpoint(CompanyContactsIdTracksEndpoint(client, parent_endpoint=self)) - self.communications = self._register_child_endpoint( - CompanyContactsIdCommunicationsEndpoint(client, parent_endpoint=self) + self.image = self._register_child_endpoint( + CompanyContactsIdImageEndpoint(client, parent_endpoint=self) ) - self.usages = self._register_child_endpoint(CompanyContactsIdUsagesEndpoint(client, parent_endpoint=self)) - self.image = self._register_child_endpoint(CompanyContactsIdImageEndpoint(client, parent_endpoint=self)) - self.notes = self._register_child_endpoint(CompanyContactsIdNotesEndpoint(client, parent_endpoint=self)) - self.groups = self._register_child_endpoint(CompanyContactsIdGroupsEndpoint(client, parent_endpoint=self)) self.portal_security = self._register_child_endpoint( CompanyContactsIdPortalsecurityEndpoint(client, parent_endpoint=self) ) + self.communications = self._register_child_endpoint( + CompanyContactsIdCommunicationsEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Contact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Contact]: """ Performs a GET request against the /company/contacts/{id} endpoint and returns an initialized PaginatedResponse object. @@ -57,7 +82,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Contact: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Contact: """ Performs a GET request against the /company/contacts/{id} endpoint. @@ -67,9 +94,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Contact: The parsed response data. """ - return self._parse_one(Contact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Contact, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contacts/{id} endpoint. @@ -79,9 +110,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Contact: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Contact: """ Performs a PUT request against the /company/contacts/{id} endpoint. @@ -91,9 +127,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Contact: The parsed response data. """ - return self._parse_one(Contact, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Contact, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Contact: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Contact: """ Performs a PATCH request against the /company/contacts/{id} endpoint. @@ -103,4 +143,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Contact: The parsed response data. """ - return self._parse_one(Contact, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Contact, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsCountEndpoint.py index eb41307cb..ab0c3f8cd 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsIdGroupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/{id}/groups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/{id}/groups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsEndpoint.py index 5183648ea..3c5fd8d68 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdGroupsCountEndpoint import CompanyContactsIdGroupsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdGroupsIdEndpoint import CompanyContactsIdGroupsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsIdGroupsCountEndpoint import ( + CompanyContactsIdGroupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdGroupsIdEndpoint import ( + CompanyContactsIdGroupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactGroup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyContactsIdGroupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "groups", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyContactsIdGroupsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyContactsIdGroupsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyContactsIdGroupsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactGroup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactGroup]: """ Performs a GET request against the /company/contacts/{id}/groups endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactGroup]: The parsed response data. """ - return self._parse_many(ContactGroup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactGroup, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactGroup: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactGroup: """ Performs a POST request against the /company/contacts/{id}/groups endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactGroup: The parsed response data. """ - return self._parse_one(ContactGroup, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ContactGroup, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsIdEndpoint.py index b8a34b13b..d66291b22 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdGroupsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactGroup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactGroup: """ Performs a GET request against the /company/contacts/{id}/groups/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactGroup: The parsed response data. """ - return self._parse_one(ContactGroup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactGroup, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contacts/{id}/groups/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactGroup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactGroup: """ Performs a PUT request against the /company/contacts/{id}/groups/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactGroup: The parsed response data. """ - return self._parse_one(ContactGroup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ContactGroup, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactGroup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactGroup: """ Performs a PATCH request against the /company/contacts/{id}/groups/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactGroup: The parsed response data. """ - return self._parse_one(ContactGroup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ContactGroup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdImageEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdImageEndpoint.py index 9a6ea5166..67b549668 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdImageEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdImageEndpoint.py @@ -9,7 +9,9 @@ class CompanyContactsIdImageEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "image", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a GET request against the /company/contacts/{id}/image endpoint. @@ -19,4 +21,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesCountEndpoint.py index 88800be52..3e75752a1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsIdNotesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/{id}/notes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/{id}/notes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesEndpoint.py index 38ed4ee28..22889c1a3 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdNotesCountEndpoint import CompanyContactsIdNotesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdNotesIdEndpoint import CompanyContactsIdNotesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsIdNotesCountEndpoint import ( + CompanyContactsIdNotesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdNotesIdEndpoint import ( + CompanyContactsIdNotesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactNote from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyContactsIdNotesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "notes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyContactsIdNotesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyContactsIdNotesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyContactsIdNotesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyContactsIdNotesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ContactNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ContactNote]: """ Performs a GET request against the /company/contacts/{id}/notes endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactNote]: """ Performs a GET request against the /company/contacts/{id}/notes endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactNote]: The parsed response data. """ - return self._parse_many(ContactNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactNote, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactNote: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactNote: """ Performs a POST request against the /company/contacts/{id}/notes endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactNote: The parsed response data. """ - return self._parse_one(ContactNote, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ContactNote, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesIdEndpoint.py index dd81beddb..5f2e887b2 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdNotesIdEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsIdNotesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ContactNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ContactNote]: """ Performs a GET request against the /company/contacts/{id}/notes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactNote: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactNote: """ Performs a GET request against the /company/contacts/{id}/notes/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactNote: The parsed response data. """ - return self._parse_one(ContactNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactNote, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contacts/{id}/notes/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactNote: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactNote: """ Performs a PUT request against the /company/contacts/{id}/notes/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactNote: The parsed response data. """ - return self._parse_one(ContactNote, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ContactNote, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactNote: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactNote: """ Performs a PATCH request against the /company/contacts/{id}/notes/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactNote: The parsed response data. """ - return self._parse_one(ContactNote, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ContactNote, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdPortalSecurityEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdPortalSecurityEndpoint.py index ed29b8a63..8da989821 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdPortalSecurityEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdPortalSecurityEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PortalSecurity]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PortalSecurity]: """ Performs a GET request against the /company/contacts/{id}/portalSecurity endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PortalSecurity]: The parsed response data. """ - return self._parse_many(PortalSecurity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PortalSecurity, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksCountEndpoint.py index afcfe7cb4..12a4d9344 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsIdTracksCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/{id}/tracks/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/{id}/tracks/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksEndpoint.py index 86df882ad..8e6f372cb 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdTracksCountEndpoint import CompanyContactsIdTracksCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdTracksIdEndpoint import CompanyContactsIdTracksIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsIdTracksCountEndpoint import ( + CompanyContactsIdTracksCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdTracksIdEndpoint import ( + CompanyContactsIdTracksIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactTrack from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyContactsIdTracksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tracks", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyContactsIdTracksCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyContactsIdTracksCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyContactsIdTracksIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactTrack]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactTrack]: """ Performs a GET request against the /company/contacts/{id}/tracks endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactTrack]: The parsed response data. """ - return self._parse_many(ContactTrack, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactTrack, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactTrack: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactTrack: """ Performs a POST request against the /company/contacts/{id}/tracks endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactTrack: The parsed response data. """ - return self._parse_one(ContactTrack, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ContactTrack, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksIdEndpoint.py index 7a7bdacbb..ab1be546e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTracksIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactTrack: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactTrack: """ Performs a GET request against the /company/contacts/{id}/tracks/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactTrack: The parsed response data. """ - return self._parse_one(ContactTrack, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactTrack, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contacts/{id}/tracks/{id} endpoint. @@ -55,4 +61,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsCountEndpoint.py index 5a3766843..86bd8c55b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsIdTypeassociationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/{id}/typeAssociations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/{id}/typeAssociations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsEndpoint.py index 00b2e7230..a43e34809 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdTypeassociationsCountEndpoint import \ - CompanyContactsIdTypeassociationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdTypeassociationsIdEndpoint import \ - CompanyContactsIdTypeassociationsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsIdTypeassociationsCountEndpoint import ( + CompanyContactsIdTypeassociationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsIdTypeassociationsIdEndpoint import ( + CompanyContactsIdTypeassociationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactContactTypeAssociation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> CompanyContactsIdTypeassociationsIdEndpoint: Returns: CompanyContactsIdTypeassociationsIdEndpoint: The initialized CompanyContactsIdTypeassociationsIdEndpoint object. """ - child = CompanyContactsIdTypeassociationsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyContactsIdTypeassociationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactContactTypeAssociation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactContactTypeAssociation]: """ Performs a GET request against the /company/contacts/{id}/typeAssociations endpoint. @@ -65,10 +71,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ContactContactTypeAssociation]: The parsed response data. """ return self._parse_many( - ContactContactTypeAssociation, super()._make_request("GET", data=data, params=params).json() + ContactContactTypeAssociation, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactContactTypeAssociation: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactContactTypeAssociation: """ Performs a POST request against the /company/contacts/{id}/typeAssociations endpoint. @@ -79,5 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactContactTypeAssociation: The parsed response data. """ return self._parse_one( - ContactContactTypeAssociation, super()._make_request("POST", data=data, params=params).json() + ContactContactTypeAssociation, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsIdEndpoint.py index 77bbf726b..417711935 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdTypeAssociationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactContactTypeAssociation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactContactTypeAssociation: """ Performs a GET request against the /company/contacts/{id}/typeAssociations/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C ContactContactTypeAssociation: The parsed response data. """ return self._parse_one( - ContactContactTypeAssociation, super()._make_request("GET", data=data, params=params).json() + ContactContactTypeAssociation, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contacts/{id}/typeAssociations/{id} endpoint. @@ -57,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactContactTypeAssociation: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactContactTypeAssociation: """ Performs a PUT request against the /company/contacts/{id}/typeAssociations/{id} endpoint. @@ -70,10 +80,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C ContactContactTypeAssociation: The parsed response data. """ return self._parse_one( - ContactContactTypeAssociation, super()._make_request("PUT", data=data, params=params).json() + ContactContactTypeAssociation, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactContactTypeAssociation: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactContactTypeAssociation: """ Performs a PATCH request against the /company/contacts/{id}/typeAssociations/{id} endpoint. @@ -84,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactContactTypeAssociation: The parsed response data. """ return self._parse_one( - ContactContactTypeAssociation, super()._make_request("PATCH", data=data, params=params).json() + ContactContactTypeAssociation, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdUsagesEndpoint.py index e234dfcb3..e5334d1c0 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsIdUsagesListEndpoint import CompanyContactsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsIdUsagesListEndpoint import ( + CompanyContactsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyContactsIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(CompanyContactsIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + CompanyContactsIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/contacts/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/contacts/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsIdUsagesListEndpoint.py index cb6007a44..14cfb71ac 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/contacts/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/contacts/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsCountEndpoint.py index e5a925fc7..4c8ae1a4e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsRelationshipsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/relationships/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/relationships/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsEndpoint.py index 3696541dc..f80ae0880 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsRelationshipsCountEndpoint import \ - CompanyContactsRelationshipsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsRelationshipsIdEndpoint import CompanyContactsRelationshipsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsRelationshipsCountEndpoint import ( + CompanyContactsRelationshipsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsRelationshipsIdEndpoint import ( + CompanyContactsRelationshipsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactRelationship from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> CompanyContactsRelationshipsIdEndpoint: Returns: CompanyContactsRelationshipsIdEndpoint: The initialized CompanyContactsRelationshipsIdEndpoint object. """ - child = CompanyContactsRelationshipsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyContactsRelationshipsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactRelationship]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactRelationship]: """ Performs a GET request against the /company/contacts/relationships endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactRelationship]: The parsed response data. """ - return self._parse_many(ContactRelationship, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactRelationship, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactRelationship: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactRelationship: """ Performs a POST request against the /company/contacts/relationships endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactRelationship: The parsed response data. """ - return self._parse_one(ContactRelationship, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ContactRelationship, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsIdEndpoint.py index d9d1d3d89..6f242e73e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsRelationshipsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactRelationship: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactRelationship: """ Performs a GET request against the /company/contacts/relationships/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactRelationship: The parsed response data. """ - return self._parse_one(ContactRelationship, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactRelationship, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contacts/relationships/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactRelationship: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactRelationship: """ Performs a PUT request against the /company/contacts/relationships/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactRelationship: The parsed response data. """ - return self._parse_one(ContactRelationship, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ContactRelationship, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactRelationship: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactRelationship: """ Performs a PATCH request against the /company/contacts/relationships/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactRelationship: The parsed response data. """ - return self._parse_one(ContactRelationship, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ContactRelationship, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsRequestPasswordEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsRequestPasswordEndpoint.py index 6f4acfc42..419b593b0 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsRequestPasswordEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsRequestPasswordEndpoint.py @@ -9,7 +9,9 @@ class CompanyContactsRequestpasswordEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "requestPassword", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /company/contacts/requestPassword endpoint. @@ -19,4 +21,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesCountEndpoint.py index 53be40eb4..157a2a46a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesCountEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsTypesCountInfoEndpoint import CompanyContactsTypesCountInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsTypesCountInfoEndpoint import ( + CompanyContactsTypesCountInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Count from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyContactsTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyContactsTypesCountInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyContactsTypesCountInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/types/count endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/types/count endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesCountInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesCountInfoEndpoint.py index bc7e05cca..76b88392c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesCountInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesCountInfoEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsTypesCountInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contacts/types/count/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contacts/types/count/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesEndpoint.py index a56ca5d14..1737aaea9 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsTypesCountEndpoint import CompanyContactsTypesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsTypesIdEndpoint import CompanyContactsTypesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsTypesInfoEndpoint import CompanyContactsTypesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsTypesCountEndpoint import ( + CompanyContactsTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsTypesIdEndpoint import ( + CompanyContactsTypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsTypesInfoEndpoint import ( + CompanyContactsTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyContactsTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyContactsTypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyContactsTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyContactsTypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyContactsTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyContactsTypesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> CompanyContactsTypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ContactType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ContactType]: """ Performs a GET request against the /company/contacts/types endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactType]: """ Performs a GET request against the /company/contacts/types endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactType]: The parsed response data. """ - return self._parse_many(ContactType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactType: """ Performs a POST request against the /company/contacts/types endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactType: The parsed response data. """ - return self._parse_one(ContactType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ContactType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesIdEndpoint.py index b840bb7d7..c2c394209 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsTypesIdInfoEndpoint import CompanyContactsTypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsTypesIdInfoEndpoint import ( + CompanyContactsTypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ContactType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyContactsTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyContactsTypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyContactsTypesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ContactType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ContactType]: """ Performs a GET request against the /company/contacts/types/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactType: """ Performs a GET request against the /company/contacts/types/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactType: The parsed response data. """ - return self._parse_one(ContactType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contacts/types/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactType: """ Performs a PUT request against the /company/contacts/types/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactType: The parsed response data. """ - return self._parse_one(ContactType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ContactType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactType: """ Performs a PATCH request against the /company/contacts/types/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ContactType: The parsed response data. """ - return self._parse_one(ContactType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ContactType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesIdInfoEndpoint.py index b086a57d8..58138e17f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ContactTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ContactTypeInfo: """ Performs a GET request against the /company/contacts/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ContactTypeInfo: The parsed response data. """ - return self._parse_one(ContactTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ContactTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesInfoEndpoint.py index c2e13d3c1..5ee3bde81 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsTypesInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ContactTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ContactTypeInfo]: """ Performs a GET request against the /company/contacts/types/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ContactTypeInfo]: The parsed response data. """ - return self._parse_many(ContactTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ContactTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsValidatePortalCredentialsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsValidatePortalCredentialsEndpoint.py index 6a9963e3d..224cc6f20 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsValidatePortalCredentialsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsValidatePortalCredentialsEndpoint.py @@ -8,9 +8,13 @@ class CompanyContactsValidateportalcredentialsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "validatePortalCredentials", parent_endpoint=parent_endpoint) + super().__init__( + client, "validatePortalCredentials", parent_endpoint=parent_endpoint + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ValidatePortalResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ValidatePortalResponse: """ Performs a POST request against the /company/contacts/validatePortalCredentials endpoint. @@ -20,4 +24,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ValidatePortalResponse: The parsed response data. """ - return self._parse_one(ValidatePortalResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ValidatePortalResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyCountEndpoint.py index 73083f985..ced38f9a9 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyContactsyncCompanyCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/contactsync/company/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/contactsync/company/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyEndpoint.py index 37f94c0bf..bedb92797 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsyncCompanyCountEndpoint import CompanyContactsyncCompanyCountEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsyncCompanyIdEndpoint import CompanyContactsyncCompanyIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsyncCompanyCountEndpoint import ( + CompanyContactsyncCompanyCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsyncCompanyIdEndpoint import ( + CompanyContactsyncCompanyIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import M365ContactSyncCompany from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyContactsyncCompanyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "company", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyContactsyncCompanyCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyContactsyncCompanyCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyContactsyncCompanyIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[M365ContactSyncCompany]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[M365ContactSyncCompany]: """ Performs a GET request against the /company/contactsync/company endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[M365ContactSyncCompany]: The parsed response data. """ - return self._parse_many(M365ContactSyncCompany, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + M365ContactSyncCompany, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/contactsync/company endpoint. @@ -72,4 +85,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyIdEndpoint.py index e56a8f066..499ca6dc5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanyIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M365ContactSyncCompany: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> M365ContactSyncCompany: """ Performs a GET request against the /company/contactsync/company/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: M365ContactSyncCompany: The parsed response data. """ - return self._parse_one(M365ContactSyncCompany, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + M365ContactSyncCompany, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanysyncEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanysyncEndpoint.py index 7e57b34e3..301d3104b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanysyncEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanysyncEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsyncCompanysyncIdEndpoint import \ - CompanyContactsyncCompanysyncIdEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsyncCompanysyncIdEndpoint import ( + CompanyContactsyncCompanysyncIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> CompanyContactsyncCompanysyncIdEndpoint: Returns: CompanyContactsyncCompanysyncIdEndpoint: The initialized CompanyContactsyncCompanysyncIdEndpoint object. """ - child = CompanyContactsyncCompanysyncIdEndpoint(self.client, parent_endpoint=self) + child = CompanyContactsyncCompanysyncIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanysyncIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanysyncIdEndpoint.py index ceb03c267..788b3023b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanysyncIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsyncCompanysyncIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M365ContactSyncCompany: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> M365ContactSyncCompany: """ Performs a GET request against the /company/contactsync/companysync/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: M365ContactSyncCompany: The parsed response data. """ - return self._parse_one(M365ContactSyncCompany, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + M365ContactSyncCompany, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyContactsyncEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyContactsyncEndpoint.py index 98fac463a..c9bc11beb 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyContactsyncEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyContactsyncEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsyncCompanyEndpoint import CompanyContactsyncCompanyEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsyncCompanysyncEndpoint import CompanyContactsyncCompanysyncEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsyncCompanyEndpoint import ( + CompanyContactsyncCompanyEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsyncCompanysyncEndpoint import ( + CompanyContactsyncCompanysyncEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class CompanyContactsyncEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "contactsync", parent_endpoint=parent_endpoint) + self.company = self._register_child_endpoint( + CompanyContactsyncCompanyEndpoint(client, parent_endpoint=self) + ) self.companysync = self._register_child_endpoint( CompanyContactsyncCompanysyncEndpoint(client, parent_endpoint=self) ) - self.company = self._register_child_endpoint(CompanyContactsyncCompanyEndpoint(client, parent_endpoint=self)) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCountriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCountriesCountEndpoint.py index efcb80300..f4ea183df 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCountriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCountriesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCountriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/countries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/countries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCountriesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCountriesEndpoint.py index 5caa2ddbb..92cf13bc5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCountriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCountriesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCountriesCountEndpoint import CompanyCountriesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyCountriesIdEndpoint import CompanyCountriesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyCountriesInfoEndpoint import CompanyCountriesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyCountriesCountEndpoint import ( + CompanyCountriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCountriesIdEndpoint import ( + CompanyCountriesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCountriesInfoEndpoint import ( + CompanyCountriesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Country from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyCountriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "countries", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyCountriesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyCountriesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCountriesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyCountriesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyCountriesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> CompanyCountriesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Country]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Country]: """ Performs a GET request against the /company/countries endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Country]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Country]: """ Performs a GET request against the /company/countries endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Country]: The parsed response data. """ - return self._parse_many(Country, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Country, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Country: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Country: """ Performs a POST request against the /company/countries endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Country: The parsed response data. """ - return self._parse_one(Country, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Country, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCountriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCountriesIdEndpoint.py index 054d4e099..a474e6a98 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCountriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCountriesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCountriesIdInfoEndpoint import CompanyCountriesIdInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyCountriesIdInfoEndpoint import ( + CompanyCountriesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Country from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyCountriesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyCountriesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyCountriesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Country]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Country]: """ Performs a GET request against the /company/countries/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Country: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Country: """ Performs a GET request against the /company/countries/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Country: The parsed response data. """ - return self._parse_one(Country, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Country, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/countries/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Country: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Country: """ Performs a PUT request against the /company/countries/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Country: The parsed response data. """ - return self._parse_one(Country, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Country, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Country: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Country: """ Performs a PATCH request against the /company/countries/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Country: The parsed response data. """ - return self._parse_one(Country, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Country, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCountriesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCountriesIdInfoEndpoint.py index 37cbf7cd2..ca2c8aeee 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCountriesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCountriesIdInfoEndpoint.py @@ -10,7 +10,9 @@ class CompanyCountriesIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CountryInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CountryInfo]: """ Performs a GET request against the /company/countries/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CountryInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CountryInfo: """ Performs a GET request against the /company/countries/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CountryInfo: The parsed response data. """ - return self._parse_one(CountryInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CountryInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCountriesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCountriesInfoCountEndpoint.py index 8ec118979..83d4e719f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCountriesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCountriesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyCountriesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/countries/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/countries/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyCountriesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyCountriesInfoEndpoint.py index cc4fcb201..67606a7da 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyCountriesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyCountriesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyCountriesInfoCountEndpoint import CompanyCountriesInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyCountriesInfoCountEndpoint import ( + CompanyCountriesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CountryInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyCountriesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyCountriesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyCountriesInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CountryInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CountryInfo]: """ Performs a GET request against the /company/countries/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CountryInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CountryInfo]: """ Performs a GET request against the /company/countries/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CountryInfo]: The parsed response data. """ - return self._parse_many(CountryInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CountryInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyEndpoint.py index a070ccb1e..d9d9f25ed 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyEndpoint.py @@ -1,37 +1,92 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyAddressformatsEndpoint import CompanyAddressformatsEndpoint -from pyconnectwise.endpoints.manage.CompanyBillingsetupsEndpoint import CompanyBillingsetupsEndpoint -from pyconnectwise.endpoints.manage.CompanyCommunicationtypesEndpoint import CompanyCommunicationtypesEndpoint -from pyconnectwise.endpoints.manage.CompanyCompaniesEndpoint import CompanyCompaniesEndpoint -from pyconnectwise.endpoints.manage.CompanyCompanyfinanceEndpoint import CompanyCompanyfinanceEndpoint -from pyconnectwise.endpoints.manage.CompanyCompanypickeritemsEndpoint import CompanyCompanypickeritemsEndpoint -from pyconnectwise.endpoints.manage.CompanyCompanytypeassociationsEndpoint import CompanyCompanytypeassociationsEndpoint -from pyconnectwise.endpoints.manage.CompanyConfigurationsEndpoint import CompanyConfigurationsEndpoint +from pyconnectwise.endpoints.manage.CompanyAddressformatsEndpoint import ( + CompanyAddressformatsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyBillingsetupsEndpoint import ( + CompanyBillingsetupsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCommunicationtypesEndpoint import ( + CompanyCommunicationtypesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompaniesEndpoint import ( + CompanyCompaniesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompanyfinanceEndpoint import ( + CompanyCompanyfinanceEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompanypickeritemsEndpoint import ( + CompanyCompanypickeritemsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCompanytypeassociationsEndpoint import ( + CompanyCompanytypeassociationsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyConfigurationsEndpoint import ( + CompanyConfigurationsEndpoint, +) from pyconnectwise.endpoints.manage.CompanyContactEndpoint import CompanyContactEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsEndpoint import CompanyContactsEndpoint -from pyconnectwise.endpoints.manage.CompanyContactsyncEndpoint import CompanyContactsyncEndpoint -from pyconnectwise.endpoints.manage.CompanyContacttypeassociationsEndpoint import CompanyContacttypeassociationsEndpoint -from pyconnectwise.endpoints.manage.CompanyCountriesEndpoint import CompanyCountriesEndpoint -from pyconnectwise.endpoints.manage.CompanyEntitytypesEndpoint import CompanyEntitytypesEndpoint -from pyconnectwise.endpoints.manage.CompanyExpensetypesEndpoint import CompanyExpensetypesEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactEndpoint import CompanyM365contactEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactsyncEndpoint import CompanyM365contactsyncEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsEndpoint import \ - CompanyManageddevicesintegrationsEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementbackupsEndpoint import CompanyManagementbackupsEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementEndpoint import CompanyManagementEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsEndpoint import CompanyManagementitsolutionsEndpoint -from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsEndpoint import CompanyMarketdescriptionsEndpoint -from pyconnectwise.endpoints.manage.CompanyNotetypesEndpoint import CompanyNotetypesEndpoint -from pyconnectwise.endpoints.manage.CompanyOwnershiptypesEndpoint import CompanyOwnershiptypesEndpoint -from pyconnectwise.endpoints.manage.CompanyPaymenttypesEndpoint import CompanyPaymenttypesEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsEndpoint import CompanyPortalconfigurationsEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalsecuritylevelsEndpoint import CompanyPortalsecuritylevelsEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalsecuritysettingsEndpoint import CompanyPortalsecuritysettingsEndpoint +from pyconnectwise.endpoints.manage.CompanyContactsEndpoint import ( + CompanyContactsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContactsyncEndpoint import ( + CompanyContactsyncEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyContacttypeassociationsEndpoint import ( + CompanyContacttypeassociationsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyCountriesEndpoint import ( + CompanyCountriesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyEntitytypesEndpoint import ( + CompanyEntitytypesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyExpensetypesEndpoint import ( + CompanyExpensetypesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyM365contactEndpoint import ( + CompanyM365contactEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyM365contactsyncEndpoint import ( + CompanyM365contactsyncEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsEndpoint import ( + CompanyManageddevicesintegrationsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementbackupsEndpoint import ( + CompanyManagementbackupsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementEndpoint import ( + CompanyManagementEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsEndpoint import ( + CompanyManagementitsolutionsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsEndpoint import ( + CompanyMarketdescriptionsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyNotetypesEndpoint import ( + CompanyNotetypesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyOwnershiptypesEndpoint import ( + CompanyOwnershiptypesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPaymenttypesEndpoint import ( + CompanyPaymenttypesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsEndpoint import ( + CompanyPortalconfigurationsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalsecuritylevelsEndpoint import ( + CompanyPortalsecuritylevelsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalsecuritysettingsEndpoint import ( + CompanyPortalsecuritysettingsEndpoint, +) from pyconnectwise.endpoints.manage.CompanyStatesEndpoint import CompanyStatesEndpoint -from pyconnectwise.endpoints.manage.CompanyTeamrolesEndpoint import CompanyTeamrolesEndpoint +from pyconnectwise.endpoints.manage.CompanyTeamrolesEndpoint import ( + CompanyTeamrolesEndpoint, +) from pyconnectwise.endpoints.manage.CompanyTracksEndpoint import CompanyTracksEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -41,64 +96,96 @@ class CompanyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "company", parent_endpoint=parent_endpoint) - self.companies = self._register_child_endpoint(CompanyCompaniesEndpoint(client, parent_endpoint=self)) - self.billing_setups = self._register_child_endpoint(CompanyBillingsetupsEndpoint(client, parent_endpoint=self)) - self.contact_type_associations = self._register_child_endpoint( - CompanyContacttypeassociationsEndpoint(client, parent_endpoint=self) + self.company_type_associations = self._register_child_endpoint( + CompanyCompanytypeassociationsEndpoint(client, parent_endpoint=self) ) - self.note_types = self._register_child_endpoint(CompanyNotetypesEndpoint(client, parent_endpoint=self)) - self.company_picker_items = self._register_child_endpoint( - CompanyCompanypickeritemsEndpoint(client, parent_endpoint=self) + self.note_types = self._register_child_endpoint( + CompanyNotetypesEndpoint(client, parent_endpoint=self) ) - self.configurations = self._register_child_endpoint(CompanyConfigurationsEndpoint(client, parent_endpoint=self)) - self.ownership_types = self._register_child_endpoint( - CompanyOwnershiptypesEndpoint(client, parent_endpoint=self) + self.company_finance = self._register_child_endpoint( + CompanyCompanyfinanceEndpoint(client, parent_endpoint=self) ) - self.contact = self._register_child_endpoint(CompanyContactEndpoint(client, parent_endpoint=self)) - self.team_roles = self._register_child_endpoint(CompanyTeamrolesEndpoint(client, parent_endpoint=self)) - self.address_formats = self._register_child_endpoint( - CompanyAddressformatsEndpoint(client, parent_endpoint=self) + self.management = self._register_child_endpoint( + CompanyManagementEndpoint(client, parent_endpoint=self) + ) + self.contacts = self._register_child_endpoint( + CompanyContactsEndpoint(client, parent_endpoint=self) ) - self.entity_types = self._register_child_endpoint(CompanyEntitytypesEndpoint(client, parent_endpoint=self)) self.market_descriptions = self._register_child_endpoint( CompanyMarketdescriptionsEndpoint(client, parent_endpoint=self) ) - self.tracks = self._register_child_endpoint(CompanyTracksEndpoint(client, parent_endpoint=self)) self.management_it_solutions = self._register_child_endpoint( CompanyManagementitsolutionsEndpoint(client, parent_endpoint=self) ) - self.company_type_associations = self._register_child_endpoint( - CompanyCompanytypeassociationsEndpoint(client, parent_endpoint=self) + self.entity_types = self._register_child_endpoint( + CompanyEntitytypesEndpoint(client, parent_endpoint=self) + ) + self.tracks = self._register_child_endpoint( + CompanyTracksEndpoint(client, parent_endpoint=self) + ) + self.contact = self._register_child_endpoint( + CompanyContactEndpoint(client, parent_endpoint=self) + ) + self.ownership_types = self._register_child_endpoint( + CompanyOwnershiptypesEndpoint(client, parent_endpoint=self) + ) + self.countries = self._register_child_endpoint( + CompanyCountriesEndpoint(client, parent_endpoint=self) + ) + self.companies = self._register_child_endpoint( + CompanyCompaniesEndpoint(client, parent_endpoint=self) ) - self.contacts = self._register_child_endpoint(CompanyContactsEndpoint(client, parent_endpoint=self)) - self.contactsync = self._register_child_endpoint(CompanyContactsyncEndpoint(client, parent_endpoint=self)) - self.states = self._register_child_endpoint(CompanyStatesEndpoint(client, parent_endpoint=self)) self.managed_devices_integrations = self._register_child_endpoint( CompanyManageddevicesintegrationsEndpoint(client, parent_endpoint=self) ) - self.management = self._register_child_endpoint(CompanyManagementEndpoint(client, parent_endpoint=self)) - self.portal_security_settings = self._register_child_endpoint( - CompanyPortalsecuritysettingsEndpoint(client, parent_endpoint=self) + self.payment_types = self._register_child_endpoint( + CompanyPaymenttypesEndpoint(client, parent_endpoint=self) ) - self.expense_types = self._register_child_endpoint(CompanyExpensetypesEndpoint(client, parent_endpoint=self)) - self.countries = self._register_child_endpoint(CompanyCountriesEndpoint(client, parent_endpoint=self)) - self.company_finance = self._register_child_endpoint( - CompanyCompanyfinanceEndpoint(client, parent_endpoint=self) + self.billing_setups = self._register_child_endpoint( + CompanyBillingsetupsEndpoint(client, parent_endpoint=self) + ) + self.configurations = self._register_child_endpoint( + CompanyConfigurationsEndpoint(client, parent_endpoint=self) + ) + self.contactsync = self._register_child_endpoint( + CompanyContactsyncEndpoint(client, parent_endpoint=self) + ) + self.company_picker_items = self._register_child_endpoint( + CompanyCompanypickeritemsEndpoint(client, parent_endpoint=self) ) - self.payment_types = self._register_child_endpoint(CompanyPaymenttypesEndpoint(client, parent_endpoint=self)) - self.m365contact = self._register_child_endpoint(CompanyM365contactEndpoint(client, parent_endpoint=self)) self.portal_security_levels = self._register_child_endpoint( CompanyPortalsecuritylevelsEndpoint(client, parent_endpoint=self) ) - self.portal_configurations = self._register_child_endpoint( - CompanyPortalconfigurationsEndpoint(client, parent_endpoint=self) + self.expense_types = self._register_child_endpoint( + CompanyExpensetypesEndpoint(client, parent_endpoint=self) + ) + self.states = self._register_child_endpoint( + CompanyStatesEndpoint(client, parent_endpoint=self) + ) + self.team_roles = self._register_child_endpoint( + CompanyTeamrolesEndpoint(client, parent_endpoint=self) + ) + self.address_formats = self._register_child_endpoint( + CompanyAddressformatsEndpoint(client, parent_endpoint=self) ) self.communication_types = self._register_child_endpoint( CompanyCommunicationtypesEndpoint(client, parent_endpoint=self) ) + self.m365contact = self._register_child_endpoint( + CompanyM365contactEndpoint(client, parent_endpoint=self) + ) self.m365contactsync = self._register_child_endpoint( CompanyM365contactsyncEndpoint(client, parent_endpoint=self) ) + self.portal_security_settings = self._register_child_endpoint( + CompanyPortalsecuritysettingsEndpoint(client, parent_endpoint=self) + ) + self.contact_type_associations = self._register_child_endpoint( + CompanyContacttypeassociationsEndpoint(client, parent_endpoint=self) + ) + self.portal_configurations = self._register_child_endpoint( + CompanyPortalconfigurationsEndpoint(client, parent_endpoint=self) + ) self.management_backups = self._register_child_endpoint( CompanyManagementbackupsEndpoint(client, parent_endpoint=self) ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyEntityTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyEntityTypesCountEndpoint.py index 3ab45a3f5..a49df2107 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyEntityTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyEntityTypesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyEntitytypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/entityTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/entityTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyEntityTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyEntityTypesEndpoint.py index c9122f03e..ceb5487a4 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyEntityTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyEntityTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyEntitytypesCountEndpoint import CompanyEntitytypesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyEntitytypesIdEndpoint import CompanyEntitytypesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyEntitytypesInfoEndpoint import CompanyEntitytypesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyEntitytypesCountEndpoint import ( + CompanyEntitytypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyEntitytypesIdEndpoint import ( + CompanyEntitytypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyEntitytypesInfoEndpoint import ( + CompanyEntitytypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EntityType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyEntitytypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "entityTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyEntitytypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyEntitytypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyEntitytypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyEntitytypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyEntitytypesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> CompanyEntitytypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[EntityType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[EntityType]: """ Performs a GET request against the /company/entityTypes endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EntityType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EntityType]: """ Performs a GET request against the /company/entityTypes endpoint. @@ -60,4 +74,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EntityType]: The parsed response data. """ - return self._parse_many(EntityType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EntityType, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyEntityTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyEntityTypesIdEndpoint.py index 7525dabc9..5cdc4e419 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyEntityTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyEntityTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyEntitytypesIdInfoEndpoint import CompanyEntitytypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyEntitytypesIdInfoEndpoint import ( + CompanyEntitytypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EntityType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyEntitytypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyEntitytypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyEntitytypesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[EntityType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[EntityType]: """ Performs a GET request against the /company/entityTypes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EntityType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EntityType: """ Performs a GET request against the /company/entityTypes/{id} endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EntityType: The parsed response data. """ - return self._parse_one(EntityType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + EntityType, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyEntityTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyEntityTypesInfoCountEndpoint.py index 03e3f2ccb..2882c2c70 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyEntityTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyEntityTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyEntitytypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/entityTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/entityTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyEntitytypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyEntitytypesIdInfoEndpoint.py index c6aa19222..ed989f73c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyEntitytypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyEntitytypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EntityTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EntityTypeInfo: """ Performs a GET request against the /company/entityTypes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EntityTypeInfo: The parsed response data. """ - return self._parse_one(EntityTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + EntityTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyEntitytypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyEntitytypesInfoEndpoint.py index 8bf51a706..13bcc74a3 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyEntitytypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyEntitytypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyEntitytypesInfoCountEndpoint import CompanyEntitytypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyEntitytypesInfoCountEndpoint import ( + CompanyEntitytypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EntityTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class CompanyEntitytypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyEntitytypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyEntitytypesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EntityTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EntityTypeInfo]: """ Performs a GET request against the /company/entityTypes/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EntityTypeInfo]: The parsed response data. """ - return self._parse_many(EntityTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EntityTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyExpenseTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyExpenseTypesInfoCountEndpoint.py index a770f910d..bbe25d4b6 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyExpenseTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyExpenseTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyExpensetypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/expenseTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/expenseTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyExpensetypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyExpensetypesEndpoint.py index d392638dd..d1befdabc 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyExpensetypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyExpensetypesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyExpensetypesInfoEndpoint import CompanyExpensetypesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyExpensetypesInfoEndpoint import ( + CompanyExpensetypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyExpensetypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "expenseTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyExpensetypesInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyExpensetypesInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyExpensetypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyExpensetypesInfoEndpoint.py index ed1338322..80328fb97 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyExpensetypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyExpensetypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyExpensetypesInfoCountEndpoint import CompanyExpensetypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyExpensetypesInfoCountEndpoint import ( + CompanyExpensetypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyExpensetypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyExpensetypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyExpensetypesInfoCountEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactCountEndpoint.py index c6a3ca871..75beeaa63 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyM365contactCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/m365contact/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/m365contact/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactEndpoint.py index b156e93fa..ef829e2a9 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactCountEndpoint import CompanyM365contactCountEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactIdEndpoint import CompanyM365contactIdEndpoint +from pyconnectwise.endpoints.manage.CompanyM365contactCountEndpoint import ( + CompanyM365contactCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyM365contactIdEndpoint import ( + CompanyM365contactIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import M365Contact from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyM365contactEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "m365contact", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyM365contactCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyM365contactCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyM365contactIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyM365contactIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[M365Contact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[M365Contact]: """ Performs a GET request against the /company/m365contact endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[M365Contact]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[M365Contact]: """ Performs a GET request against the /company/m365contact endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[M365Contact]: The parsed response data. """ - return self._parse_many(M365Contact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + M365Contact, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactIdEndpoint.py index ce7aa7491..6036b0a0a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactIdEndpoint.py @@ -10,7 +10,9 @@ class CompanyM365contactIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[M365Contact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[M365Contact]: """ Performs a GET request against the /company/m365contact/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M365Contact: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> M365Contact: """ Performs a GET request against the /company/m365contact/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: M365Contact: The parsed response data. """ - return self._parse_one(M365Contact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + M365Contact, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncEndpoint.py index f8cc92790..12a8df1bf 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactsyncIdEndpoint import CompanyM365contactsyncIdEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactsyncPropertyEndpoint import CompanyM365contactsyncPropertyEndpoint +from pyconnectwise.endpoints.manage.CompanyM365contactsyncIdEndpoint import ( + CompanyM365contactsyncIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyM365contactsyncPropertyEndpoint import ( + CompanyM365contactsyncPropertyEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncIdEndpoint.py index 7c57ef416..71500f900 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactsyncIdPropertyEndpoint import \ - CompanyM365contactsyncIdPropertyEndpoint +from pyconnectwise.endpoints.manage.CompanyM365contactsyncIdPropertyEndpoint import ( + CompanyM365contactsyncIdPropertyEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncIdPropertyEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncIdPropertyEndpoint.py index a726c3c4d..988653c36 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncIdPropertyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncIdPropertyEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M365ContactSyncProperty: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> M365ContactSyncProperty: """ Performs a GET request against the /company/m365contactsync/{id}/property endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: M365ContactSyncProperty: The parsed response data. """ - return self._parse_one(M365ContactSyncProperty, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + M365ContactSyncProperty, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyCountEndpoint.py index 1860ba81f..62e853bff 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyM365contactsyncPropertyCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/m365contactsync/property/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/m365contactsync/property/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyEndpoint.py index 50ac54a3c..4d058a847 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactsyncPropertyCountEndpoint import \ - CompanyM365contactsyncPropertyCountEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactsyncPropertyExcludedEndpoint import \ - CompanyM365contactsyncPropertyExcludedEndpoint -from pyconnectwise.endpoints.manage.CompanyM365contactsyncPropertyIncludedEndpoint import \ - CompanyM365contactsyncPropertyIncludedEndpoint +from pyconnectwise.endpoints.manage.CompanyM365contactsyncPropertyCountEndpoint import ( + CompanyM365contactsyncPropertyCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyM365contactsyncPropertyExcludedEndpoint import ( + CompanyM365contactsyncPropertyExcludedEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyM365contactsyncPropertyIncludedEndpoint import ( + CompanyM365contactsyncPropertyIncludedEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import M365ContactSyncProperty from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,17 +19,19 @@ class CompanyM365contactsyncPropertyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "property", parent_endpoint=parent_endpoint) + self.included = self._register_child_endpoint( + CompanyM365contactsyncPropertyIncludedEndpoint(client, parent_endpoint=self) + ) self.excluded = self._register_child_endpoint( CompanyM365contactsyncPropertyExcludedEndpoint(client, parent_endpoint=self) ) self.count = self._register_child_endpoint( CompanyM365contactsyncPropertyCountEndpoint(client, parent_endpoint=self) ) - self.included = self._register_child_endpoint( - CompanyM365contactsyncPropertyIncludedEndpoint(client, parent_endpoint=self) - ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M365ContactSyncProperty: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> M365ContactSyncProperty: """ Performs a POST request against the /company/m365contactsync/property endpoint. @@ -36,4 +41,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: M365ContactSyncProperty: The parsed response data. """ - return self._parse_one(M365ContactSyncProperty, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + M365ContactSyncProperty, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyExcludedEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyExcludedEndpoint.py index 222b3f581..fa584f88c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyExcludedEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyExcludedEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[M365ContactSyncProperty]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[M365ContactSyncProperty]: """ Performs a GET request against the /company/m365contactsync/property/excluded endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[M365ContactSyncProperty]: The parsed response data. """ - return self._parse_many(M365ContactSyncProperty, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + M365ContactSyncProperty, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyIncludedEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyIncludedEndpoint.py index 3851e074e..1180056ea 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyIncludedEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyM365contactsyncPropertyIncludedEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[M365ContactSyncProperty]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[M365ContactSyncProperty]: """ Performs a GET request against the /company/m365contactsync/property/included endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[M365ContactSyncProperty]: The parsed response data. """ - return self._parse_many(M365ContactSyncProperty, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + M365ContactSyncProperty, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsCountEndpoint.py index 61e3566cd..76b497dcc 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyManageddevicesintegrationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/managedDevicesIntegrations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/managedDevicesIntegrations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsEndpoint.py index fee4b9f06..134fdc822 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsCountEndpoint import \ - CompanyManageddevicesintegrationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdEndpoint import \ - CompanyManageddevicesintegrationsIdEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsInfoEndpoint import \ - CompanyManageddevicesintegrationsInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsCountEndpoint import ( + CompanyManageddevicesintegrationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdEndpoint import ( + CompanyManageddevicesintegrationsIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsInfoEndpoint import ( + CompanyManageddevicesintegrationsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagedDevicesIntegration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,14 +17,16 @@ class CompanyManageddevicesintegrationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "managedDevicesIntegrations", parent_endpoint=parent_endpoint) - - self.info = self._register_child_endpoint( - CompanyManageddevicesintegrationsInfoEndpoint(client, parent_endpoint=self) + super().__init__( + client, "managedDevicesIntegrations", parent_endpoint=parent_endpoint ) + self.count = self._register_child_endpoint( CompanyManageddevicesintegrationsCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + CompanyManageddevicesintegrationsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyManageddevicesintegrationsIdEndpoint: """ @@ -32,7 +37,9 @@ def id(self, id: int) -> CompanyManageddevicesintegrationsIdEndpoint: Returns: CompanyManageddevicesintegrationsIdEndpoint: The initialized CompanyManageddevicesintegrationsIdEndpoint object. """ - child = CompanyManageddevicesintegrationsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyManageddevicesintegrationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -59,7 +66,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagedDevicesIntegration]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagedDevicesIntegration]: """ Performs a GET request against the /company/managedDevicesIntegrations endpoint. @@ -70,10 +79,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ManagedDevicesIntegration]: The parsed response data. """ return self._parse_many( - ManagedDevicesIntegration, super()._make_request("GET", data=data, params=params).json() + ManagedDevicesIntegration, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegration: """ Performs a POST request against the /company/managedDevicesIntegrations endpoint. @@ -84,5 +96,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegration: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegration, super()._make_request("POST", data=data, params=params).json() + ManagedDevicesIntegration, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesCountEndpoint.py index e7f68f524..a51cd4ec4 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyManageddevicesintegrationsIdCrossreferencesCountEndpoint(ConnectWiseEndpoint): +class CompanyManageddevicesintegrationsIdCrossreferencesCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/crossReferences/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/crossReferences/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesEndpoint.py index 4a432e891..c78d34bea 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdCrossreferencesCountEndpoint import \ - CompanyManageddevicesintegrationsIdCrossreferencesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint import \ - CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdCrossreferencesCountEndpoint import ( + CompanyManageddevicesintegrationsIdCrossreferencesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint import ( + CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagedDevicesIntegrationCrossReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,10 +17,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "crossReferences", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyManageddevicesintegrationsIdCrossreferencesCountEndpoint(client, parent_endpoint=self) + CompanyManageddevicesintegrationsIdCrossreferencesCountEndpoint( + client, parent_endpoint=self + ) ) - def id(self, id: int) -> CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint: + def id( + self, id: int + ) -> CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint: """ Sets the ID for this endpoint and returns an initialized CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint object to move down the chain. @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyManageddevicesintegrationsIdCrossreferencesIdEnd Returns: CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint: The initialized CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint object. """ - child = CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint(self.client, parent_endpoint=self) + child = CompanyManageddevicesintegrationsIdCrossreferencesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,7 +75,8 @@ def get( list[ManagedDevicesIntegrationCrossReference]: The parsed response data. """ return self._parse_many( - ManagedDevicesIntegrationCrossReference, super()._make_request("GET", data=data, params=params).json() + ManagedDevicesIntegrationCrossReference, + super()._make_request("GET", data=data, params=params).json(), ) def post( @@ -83,5 +92,6 @@ def post( ManagedDevicesIntegrationCrossReference: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationCrossReference, super()._make_request("POST", data=data, params=params).json() + ManagedDevicesIntegrationCrossReference, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesIdEndpoint.py index c76966b33..f29e178d2 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdCrossReferencesIdEndpoint.py @@ -46,7 +46,8 @@ def get( ManagedDevicesIntegrationCrossReference: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationCrossReference, super()._make_request("GET", data=data, params=params).json() + ManagedDevicesIntegrationCrossReference, + super()._make_request("GET", data=data, params=params).json(), ) def put( @@ -62,7 +63,8 @@ def put( ManagedDevicesIntegrationCrossReference: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationCrossReference, super()._make_request("PUT", data=data, params=params).json() + ManagedDevicesIntegrationCrossReference, + super()._make_request("PUT", data=data, params=params).json(), ) def patch( @@ -78,7 +80,8 @@ def patch( ManagedDevicesIntegrationCrossReference: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationCrossReference, super()._make_request("PATCH", data=data, params=params).json() + ManagedDevicesIntegrationCrossReference, + super()._make_request("PATCH", data=data, params=params).json(), ) def delete( @@ -94,5 +97,6 @@ def delete( ManagedDevicesIntegrationCrossReference: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationCrossReference, super()._make_request("DELETE", data=data, params=params).json() + ManagedDevicesIntegrationCrossReference, + super()._make_request("DELETE", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdEndpoint.py index 43d58ef76..244060692 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdEndpoint.py @@ -1,16 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdCrossreferencesEndpoint import \ - CompanyManageddevicesintegrationsIdCrossreferencesEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdInfoEndpoint import \ - CompanyManageddevicesintegrationsIdInfoEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdLoginsEndpoint import \ - CompanyManageddevicesintegrationsIdLoginsEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdNotificationsEndpoint import \ - CompanyManageddevicesintegrationsIdNotificationsEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdUsagesEndpoint import \ - CompanyManageddevicesintegrationsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdCrossreferencesEndpoint import ( + CompanyManageddevicesintegrationsIdCrossreferencesEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdInfoEndpoint import ( + CompanyManageddevicesintegrationsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdLoginsEndpoint import ( + CompanyManageddevicesintegrationsIdLoginsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdNotificationsEndpoint import ( + CompanyManageddevicesintegrationsIdNotificationsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdUsagesEndpoint import ( + CompanyManageddevicesintegrationsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagedDevicesIntegration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,19 +26,29 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.info = self._register_child_endpoint( - CompanyManageddevicesintegrationsIdInfoEndpoint(client, parent_endpoint=self) + CompanyManageddevicesintegrationsIdInfoEndpoint( + client, parent_endpoint=self + ) + ) + self.notifications = self._register_child_endpoint( + CompanyManageddevicesintegrationsIdNotificationsEndpoint( + client, parent_endpoint=self + ) ) self.usages = self._register_child_endpoint( - CompanyManageddevicesintegrationsIdUsagesEndpoint(client, parent_endpoint=self) + CompanyManageddevicesintegrationsIdUsagesEndpoint( + client, parent_endpoint=self + ) ) self.logins = self._register_child_endpoint( - CompanyManageddevicesintegrationsIdLoginsEndpoint(client, parent_endpoint=self) - ) - self.notifications = self._register_child_endpoint( - CompanyManageddevicesintegrationsIdNotificationsEndpoint(client, parent_endpoint=self) + CompanyManageddevicesintegrationsIdLoginsEndpoint( + client, parent_endpoint=self + ) ) self.cross_references = self._register_child_endpoint( - CompanyManageddevicesintegrationsIdCrossreferencesEndpoint(client, parent_endpoint=self) + CompanyManageddevicesintegrationsIdCrossreferencesEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -59,7 +74,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegration: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegration: """ Performs a GET request against the /company/managedDevicesIntegrations/{id} endpoint. @@ -69,9 +86,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManagedDevicesIntegration: The parsed response data. """ - return self._parse_one(ManagedDevicesIntegration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ManagedDevicesIntegration, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/managedDevicesIntegrations/{id} endpoint. @@ -81,9 +103,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegration: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegration: """ Performs a PUT request against the /company/managedDevicesIntegrations/{id} endpoint. @@ -93,9 +120,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManagedDevicesIntegration: The parsed response data. """ - return self._parse_one(ManagedDevicesIntegration, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ManagedDevicesIntegration, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegration: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegration: """ Performs a PATCH request against the /company/managedDevicesIntegrations/{id} endpoint. @@ -106,5 +138,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegration: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegration, super()._make_request("PATCH", data=data, params=params).json() + ManagedDevicesIntegration, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdInfoEndpoint.py index e2f9065bd..a0c4b4080 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegrationInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegrationInfo: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/info endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M ManagedDevicesIntegrationInfo: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationInfo, super()._make_request("GET", data=data, params=params).json() + ManagedDevicesIntegrationInfo, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsCountEndpoint.py index 7d2c89511..916af3d05 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyManageddevicesintegrationsIdLoginsCountEndpoint(ConnectWiseEndpoint def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/logins/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/logins/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsEndpoint.py index 5dca18b00..6980cc9d4 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdLoginsCountEndpoint import \ - CompanyManageddevicesintegrationsIdLoginsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdLoginsIdEndpoint import \ - CompanyManageddevicesintegrationsIdLoginsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdLoginsCountEndpoint import ( + CompanyManageddevicesintegrationsIdLoginsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdLoginsIdEndpoint import ( + CompanyManageddevicesintegrationsIdLoginsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagedDevicesIntegrationLogin from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "logins", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyManageddevicesintegrationsIdLoginsCountEndpoint(client, parent_endpoint=self) + CompanyManageddevicesintegrationsIdLoginsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyManageddevicesintegrationsIdLoginsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyManageddevicesintegrationsIdLoginsIdEndpoint: Returns: CompanyManageddevicesintegrationsIdLoginsIdEndpoint: The initialized CompanyManageddevicesintegrationsIdLoginsIdEndpoint object. """ - child = CompanyManageddevicesintegrationsIdLoginsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyManageddevicesintegrationsIdLoginsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagedDevicesIntegrationLogin]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagedDevicesIntegrationLogin]: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/logins endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ManagedDevicesIntegrationLogin]: The parsed response data. """ return self._parse_many( - ManagedDevicesIntegrationLogin, super()._make_request("GET", data=data, params=params).json() + ManagedDevicesIntegrationLogin, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegrationLogin: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegrationLogin: """ Performs a POST request against the /company/managedDevicesIntegrations/{id}/logins endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegrationLogin: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationLogin, super()._make_request("POST", data=data, params=params).json() + ManagedDevicesIntegrationLogin, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsIdEndpoint.py index 7bea8f9b3..b259b74a9 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdLoginsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegrationLogin: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegrationLogin: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/logins/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M ManagedDevicesIntegrationLogin: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationLogin, super()._make_request("GET", data=data, params=params).json() + ManagedDevicesIntegrationLogin, + super()._make_request("GET", data=data, params=params).json(), ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegrationLogin: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegrationLogin: """ Performs a PUT request against the /company/managedDevicesIntegrations/{id}/logins/{id} endpoint. @@ -58,10 +63,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M ManagedDevicesIntegrationLogin: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationLogin, super()._make_request("PUT", data=data, params=params).json() + ManagedDevicesIntegrationLogin, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegrationLogin: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegrationLogin: """ Performs a PATCH request against the /company/managedDevicesIntegrations/{id}/logins/{id} endpoint. @@ -72,10 +80,13 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegrationLogin: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationLogin, super()._make_request("PATCH", data=data, params=params).json() + ManagedDevicesIntegrationLogin, + super()._make_request("PATCH", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagedDevicesIntegrationLogin: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagedDevicesIntegrationLogin: """ Performs a DELETE request against the /company/managedDevicesIntegrations/{id}/logins/{id} endpoint. @@ -86,5 +97,6 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - ManagedDevicesIntegrationLogin: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationLogin, super()._make_request("DELETE", data=data, params=params).json() + ManagedDevicesIntegrationLogin, + super()._make_request("DELETE", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsCountEndpoint.py index 25e239b8c..40fb17e70 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyManageddevicesintegrationsIdNotificationsCountEndpoint(ConnectWiseEndpoint): +class CompanyManageddevicesintegrationsIdNotificationsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/notifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/notifications/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsEndpoint.py index 9b8db37ad..12153ff6f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdNotificationsCountEndpoint import \ - CompanyManageddevicesintegrationsIdNotificationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdNotificationsIdEndpoint import \ - CompanyManageddevicesintegrationsIdNotificationsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdNotificationsCountEndpoint import ( + CompanyManageddevicesintegrationsIdNotificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdNotificationsIdEndpoint import ( + CompanyManageddevicesintegrationsIdNotificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagedDevicesIntegrationNotification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "notifications", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyManageddevicesintegrationsIdNotificationsCountEndpoint(client, parent_endpoint=self) + CompanyManageddevicesintegrationsIdNotificationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyManageddevicesintegrationsIdNotificationsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyManageddevicesintegrationsIdNotificationsIdEndpo Returns: CompanyManageddevicesintegrationsIdNotificationsIdEndpoint: The initialized CompanyManageddevicesintegrationsIdNotificationsIdEndpoint object. """ - child = CompanyManageddevicesintegrationsIdNotificationsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyManageddevicesintegrationsIdNotificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,7 +73,8 @@ def get( list[ManagedDevicesIntegrationNotification]: The parsed response data. """ return self._parse_many( - ManagedDevicesIntegrationNotification, super()._make_request("GET", data=data, params=params).json() + ManagedDevicesIntegrationNotification, + super()._make_request("GET", data=data, params=params).json(), ) def post( @@ -83,5 +90,6 @@ def post( ManagedDevicesIntegrationNotification: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationNotification, super()._make_request("POST", data=data, params=params).json() + ManagedDevicesIntegrationNotification, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsIdEndpoint.py index c96314557..ac9521101 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdNotificationsIdEndpoint.py @@ -46,7 +46,8 @@ def get( ManagedDevicesIntegrationNotification: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationNotification, super()._make_request("GET", data=data, params=params).json() + ManagedDevicesIntegrationNotification, + super()._make_request("GET", data=data, params=params).json(), ) def put( @@ -62,7 +63,8 @@ def put( ManagedDevicesIntegrationNotification: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationNotification, super()._make_request("PUT", data=data, params=params).json() + ManagedDevicesIntegrationNotification, + super()._make_request("PUT", data=data, params=params).json(), ) def patch( @@ -78,7 +80,8 @@ def patch( ManagedDevicesIntegrationNotification: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationNotification, super()._make_request("PATCH", data=data, params=params).json() + ManagedDevicesIntegrationNotification, + super()._make_request("PATCH", data=data, params=params).json(), ) def delete( @@ -94,5 +97,6 @@ def delete( ManagedDevicesIntegrationNotification: The parsed response data. """ return self._parse_one( - ManagedDevicesIntegrationNotification, super()._make_request("DELETE", data=data, params=params).json() + ManagedDevicesIntegrationNotification, + super()._make_request("DELETE", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdUsagesEndpoint.py index 54e6d8adc..a7dd522db 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdUsagesListEndpoint import \ - CompanyManageddevicesintegrationsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsIdUsagesListEndpoint import ( + CompanyManageddevicesintegrationsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +14,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) self.list = self._register_child_endpoint( - CompanyManageddevicesintegrationsIdUsagesListEndpoint(client, parent_endpoint=self) + CompanyManageddevicesintegrationsIdUsagesListEndpoint( + client, parent_endpoint=self + ) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +42,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/usages endpoint. @@ -47,4 +54,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdUsagesListEndpoint.py index 15cebba50..9be3b2456 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyManageddevicesintegrationsIdUsagesListEndpoint(ConnectWiseEndpoint) def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/managedDevicesIntegrations/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsInfoCountEndpoint.py index 39131b6cf..1f05c3423 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyManageddevicesintegrationsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/managedDevicesIntegrations/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/managedDevicesIntegrations/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsInfoEndpoint.py index b630ec9d7..fb871b6c7 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagedDevicesIntegrationsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsInfoCountEndpoint import \ - CompanyManageddevicesintegrationsInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyManageddevicesintegrationsInfoCountEndpoint import ( + CompanyManageddevicesintegrationsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagedDevicesIntegrationInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyManageddevicesintegrationsInfoCountEndpoint(client, parent_endpoint=self) + CompanyManageddevicesintegrationsInfoCountEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagedDevicesIntegrationInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagedDevicesIntegrationInfo]: """ Performs a GET request against the /company/managedDevicesIntegrations/info endpoint. @@ -50,5 +55,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ManagedDevicesIntegrationInfo]: The parsed response data. """ return self._parse_many( - ManagedDevicesIntegrationInfo, super()._make_request("GET", data=data, params=params).json() + ManagedDevicesIntegrationInfo, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsCountEndpoint.py index 47018bfa6..e3e612392 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyManagementbackupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/managementBackups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/managementBackups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsEndpoint.py index 20d132120..760c1ec62 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementbackupsCountEndpoint import CompanyManagementbackupsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementbackupsIdEndpoint import CompanyManagementbackupsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyManagementbackupsCountEndpoint import ( + CompanyManagementbackupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementbackupsIdEndpoint import ( + CompanyManagementbackupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagementBackup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyManagementbackupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "managementBackups", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyManagementbackupsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyManagementbackupsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyManagementbackupsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagementBackup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagementBackup]: """ Performs a GET request against the /company/managementBackups endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ManagementBackup]: The parsed response data. """ - return self._parse_many(ManagementBackup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ManagementBackup, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementBackup: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementBackup: """ Performs a POST request against the /company/managementBackups endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ManagementBackup: The parsed response data. """ - return self._parse_one(ManagementBackup, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ManagementBackup, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsIdEndpoint.py index 32589ab2a..3b8946a47 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementBackupsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementBackup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementBackup: """ Performs a GET request against the /company/managementBackups/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManagementBackup: The parsed response data. """ - return self._parse_one(ManagementBackup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ManagementBackup, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/managementBackups/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementBackup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementBackup: """ Performs a PUT request against the /company/managementBackups/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManagementBackup: The parsed response data. """ - return self._parse_one(ManagementBackup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ManagementBackup, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementBackup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementBackup: """ Performs a PATCH request against the /company/managementBackups/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ManagementBackup: The parsed response data. """ - return self._parse_one(ManagementBackup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ManagementBackup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementCountEndpoint.py index 54870920c..4e2325107 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyManagementCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/management/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/management/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementEndpoint.py index 9d8fc6335..6ab546a7a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementCountEndpoint import CompanyManagementCountEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementIdEndpoint import CompanyManagementIdEndpoint +from pyconnectwise.endpoints.manage.CompanyManagementCountEndpoint import ( + CompanyManagementCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementIdEndpoint import ( + CompanyManagementIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Management from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyManagementEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "management", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyManagementCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyManagementCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyManagementIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyManagementIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Management]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Management]: """ Performs a GET request against the /company/management endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Management]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Management]: """ Performs a GET request against the /company/management endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Management]: The parsed response data. """ - return self._parse_many(Management, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Management, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementIdEndpoint.py index 70ad23d14..0bea10ad9 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementIdEndpoint.py @@ -1,12 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementIdExecutemanageditsyncEndpoint import \ - CompanyManagementIdExecutemanageditsyncEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementIdLogEndpoint import CompanyManagementIdLogEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementIdLogsEndpoint import CompanyManagementIdLogsEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementIdManagementreportnotificationsEndpoint import \ - CompanyManagementIdManagementreportnotificationsEndpoint +from pyconnectwise.endpoints.manage.CompanyManagementIdExecutemanageditsyncEndpoint import ( + CompanyManagementIdExecutemanageditsyncEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementIdLogEndpoint import ( + CompanyManagementIdLogEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementIdLogsEndpoint import ( + CompanyManagementIdLogsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementIdManagementreportnotificationsEndpoint import ( + CompanyManagementIdManagementreportnotificationsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Management from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,16 +22,26 @@ class CompanyManagementIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.logs = self._register_child_endpoint(CompanyManagementIdLogsEndpoint(client, parent_endpoint=self)) + self.logs = self._register_child_endpoint( + CompanyManagementIdLogsEndpoint(client, parent_endpoint=self) + ) self.execute_managed_it_sync = self._register_child_endpoint( - CompanyManagementIdExecutemanageditsyncEndpoint(client, parent_endpoint=self) + CompanyManagementIdExecutemanageditsyncEndpoint( + client, parent_endpoint=self + ) ) - self.log = self._register_child_endpoint(CompanyManagementIdLogEndpoint(client, parent_endpoint=self)) self.management_report_notifications = self._register_child_endpoint( - CompanyManagementIdManagementreportnotificationsEndpoint(client, parent_endpoint=self) + CompanyManagementIdManagementreportnotificationsEndpoint( + client, parent_endpoint=self + ) + ) + self.log = self._register_child_endpoint( + CompanyManagementIdLogEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Management]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Management]: """ Performs a GET request against the /company/management/{id} endpoint and returns an initialized PaginatedResponse object. @@ -46,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Management: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Management: """ Performs a GET request against the /company/management/{id} endpoint. @@ -56,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: Management: The parsed response data. """ - return self._parse_one(Management, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Management, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Management: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Management: """ Performs a PUT request against the /company/management/{id} endpoint. @@ -68,9 +90,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: Management: The parsed response data. """ - return self._parse_one(Management, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Management, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Management: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Management: """ Performs a PATCH request against the /company/management/{id} endpoint. @@ -80,4 +106,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Management: The parsed response data. """ - return self._parse_one(Management, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Management, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementIdExecuteManagedItSyncEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementIdExecuteManagedItSyncEndpoint.py index 238b37bf2..d6d42510a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementIdExecuteManagedItSyncEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementIdExecuteManagedItSyncEndpoint.py @@ -8,9 +8,13 @@ class CompanyManagementIdExecutemanageditsyncEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "executeManagedItSync", parent_endpoint=parent_endpoint) + super().__init__( + client, "executeManagedItSync", parent_endpoint=parent_endpoint + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /company/management/{id}/executeManagedItSync endpoint. @@ -20,4 +24,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogDownloadEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogDownloadEndpoint.py index 35d978cf0..10095fcdd 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogDownloadEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogDownloadEndpoint.py @@ -9,7 +9,9 @@ class CompanyManagementIdLogDownloadEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "download", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a GET request against the /company/management/{id}/log/download endpoint. @@ -19,4 +21,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogEndpoint.py index 037fcdf16..53e2bd2d9 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementIdLogDownloadEndpoint import CompanyManagementIdLogDownloadEndpoint +from pyconnectwise.endpoints.manage.CompanyManagementIdLogDownloadEndpoint import ( + CompanyManagementIdLogDownloadEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogsEndpoint.py index bb7e6d2c2..3a4955180 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementIdLogsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagementLogDocumentInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagementLogDocumentInfo]: """ Performs a GET request against the /company/management/{id}/logs endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ManagementLogDocumentInfo]: The parsed response data. """ return self._parse_many( - ManagementLogDocumentInfo, super()._make_request("GET", data=data, params=params).json() + ManagementLogDocumentInfo, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsCountEndpoint.py index e755ced98..510cb86fb 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyManagementIdManagementreportnotificationsCountEndpoint(ConnectWiseEndpoint): +class CompanyManagementIdManagementreportnotificationsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/management/{id}/managementReportNotifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/management/{id}/managementReportNotifications/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsEndpoint.py index c1070ab53..e37862de3 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementIdManagementreportnotificationsCountEndpoint import \ - CompanyManagementIdManagementreportnotificationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementIdManagementreportnotificationsIdEndpoint import \ - CompanyManagementIdManagementreportnotificationsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyManagementIdManagementreportnotificationsCountEndpoint import ( + CompanyManagementIdManagementreportnotificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementIdManagementreportnotificationsIdEndpoint import ( + CompanyManagementIdManagementreportnotificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagementReportNotification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class CompanyManagementIdManagementreportnotificationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "managementReportNotifications", parent_endpoint=parent_endpoint) + super().__init__( + client, "managementReportNotifications", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - CompanyManagementIdManagementreportnotificationsCountEndpoint(client, parent_endpoint=self) + CompanyManagementIdManagementreportnotificationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyManagementIdManagementreportnotificationsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyManagementIdManagementreportnotificationsIdEndpo Returns: CompanyManagementIdManagementreportnotificationsIdEndpoint: The initialized CompanyManagementIdManagementreportnotificationsIdEndpoint object. """ - child = CompanyManagementIdManagementreportnotificationsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyManagementIdManagementreportnotificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagementReportNotification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagementReportNotification]: """ Performs a GET request against the /company/management/{id}/managementReportNotifications endpoint. @@ -65,10 +75,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ManagementReportNotification]: The parsed response data. """ return self._parse_many( - ManagementReportNotification, super()._make_request("GET", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportNotification: """ Performs a POST request against the /company/management/{id}/managementReportNotifications endpoint. @@ -79,5 +92,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: The parsed response data. """ return self._parse_one( - ManagementReportNotification, super()._make_request("POST", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsIdEndpoint.py index 06ac3b211..655e52eb2 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementIdManagementReportNotificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportNotification: """ Performs a GET request against the /company/management/{id}/managementReportNotifications/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M ManagementReportNotification: The parsed response data. """ return self._parse_one( - ManagementReportNotification, super()._make_request("GET", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/management/{id}/managementReportNotifications/{id} endpoint. @@ -57,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportNotification: """ Performs a PUT request against the /company/management/{id}/managementReportNotifications/{id} endpoint. @@ -70,10 +80,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M ManagementReportNotification: The parsed response data. """ return self._parse_one( - ManagementReportNotification, super()._make_request("PUT", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementReportNotification: """ Performs a PATCH request against the /company/management/{id}/managementReportNotifications/{id} endpoint. @@ -84,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementReportNotification: The parsed response data. """ return self._parse_one( - ManagementReportNotification, super()._make_request("PATCH", data=data, params=params).json() + ManagementReportNotification, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsCountEndpoint.py index bd52b9607..5a80f6297 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyManagementitsolutionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/managementItSolutions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/managementItSolutions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsEndpoint.py index c670f6370..58ce69f58 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsCountEndpoint import \ - CompanyManagementitsolutionsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdEndpoint import CompanyManagementitsolutionsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsCountEndpoint import ( + CompanyManagementitsolutionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdEndpoint import ( + CompanyManagementitsolutionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagementItSolution from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +14,9 @@ class CompanyManagementitsolutionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "managementItSolutions", parent_endpoint=parent_endpoint) + super().__init__( + client, "managementItSolutions", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( CompanyManagementitsolutionsCountEndpoint(client, parent_endpoint=self) @@ -26,7 +31,9 @@ def id(self, id: int) -> CompanyManagementitsolutionsIdEndpoint: Returns: CompanyManagementitsolutionsIdEndpoint: The initialized CompanyManagementitsolutionsIdEndpoint object. """ - child = CompanyManagementitsolutionsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyManagementitsolutionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagementItSolution]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagementItSolution]: """ Performs a GET request against the /company/managementItSolutions endpoint. @@ -63,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ManagementItSolution]: The parsed response data. """ - return self._parse_many(ManagementItSolution, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ManagementItSolution, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementItSolution: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementItSolution: """ Performs a POST request against the /company/managementItSolutions endpoint. @@ -75,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ManagementItSolution: The parsed response data. """ - return self._parse_one(ManagementItSolution, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ManagementItSolution, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdEndpoint.py index 2d019c473..14bae0344 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdManagementproductsEndpoint import \ - CompanyManagementitsolutionsIdManagementproductsEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdUsagesEndpoint import \ - CompanyManagementitsolutionsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdManagementproductsEndpoint import ( + CompanyManagementitsolutionsIdManagementproductsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdUsagesEndpoint import ( + CompanyManagementitsolutionsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagementItSolution from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -18,7 +20,9 @@ def __init__(self, client, parent_endpoint=None): CompanyManagementitsolutionsIdUsagesEndpoint(client, parent_endpoint=self) ) self.management_products = self._register_child_endpoint( - CompanyManagementitsolutionsIdManagementproductsEndpoint(client, parent_endpoint=self) + CompanyManagementitsolutionsIdManagementproductsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -44,7 +48,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementItSolution: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementItSolution: """ Performs a GET request against the /company/managementItSolutions/{id} endpoint. @@ -54,9 +60,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManagementItSolution: The parsed response data. """ - return self._parse_one(ManagementItSolution, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ManagementItSolution, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/managementItSolutions/{id} endpoint. @@ -66,9 +77,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementItSolution: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementItSolution: """ Performs a PUT request against the /company/managementItSolutions/{id} endpoint. @@ -78,9 +94,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManagementItSolution: The parsed response data. """ - return self._parse_one(ManagementItSolution, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ManagementItSolution, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementItSolution: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementItSolution: """ Performs a PATCH request against the /company/managementItSolutions/{id} endpoint. @@ -90,4 +111,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ManagementItSolution: The parsed response data. """ - return self._parse_one(ManagementItSolution, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ManagementItSolution, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdManagementProductsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdManagementProductsCountEndpoint.py index 273771802..3604e424d 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdManagementProductsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdManagementProductsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyManagementitsolutionsIdManagementproductsCountEndpoint(ConnectWiseEndpoint): +class CompanyManagementitsolutionsIdManagementproductsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/managementItSolutions/{id}/managementProducts/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/managementItSolutions/{id}/managementProducts/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdManagementProductsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdManagementProductsEndpoint.py index 3ae265e35..63a2f5527 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdManagementProductsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdManagementProductsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdManagementproductsCountEndpoint import \ - CompanyManagementitsolutionsIdManagementproductsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdManagementproductsIdEndpoint import \ - CompanyManagementitsolutionsIdManagementproductsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdManagementproductsCountEndpoint import ( + CompanyManagementitsolutionsIdManagementproductsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdManagementproductsIdEndpoint import ( + CompanyManagementitsolutionsIdManagementproductsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagementItSolutionAgreementInterfaceParameter from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "managementProducts", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyManagementitsolutionsIdManagementproductsCountEndpoint(client, parent_endpoint=self) + CompanyManagementitsolutionsIdManagementproductsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyManagementitsolutionsIdManagementproductsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyManagementitsolutionsIdManagementproductsIdEndpo Returns: CompanyManagementitsolutionsIdManagementproductsIdEndpoint: The initialized CompanyManagementitsolutionsIdManagementproductsIdEndpoint object. """ - child = CompanyManagementitsolutionsIdManagementproductsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyManagementitsolutionsIdManagementproductsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdUsagesEndpoint.py index 3af5c7377..f1c133543 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdUsagesListEndpoint import \ - CompanyManagementitsolutionsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyManagementitsolutionsIdUsagesListEndpoint import ( + CompanyManagementitsolutionsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +14,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) self.list = self._register_child_endpoint( - CompanyManagementitsolutionsIdUsagesListEndpoint(client, parent_endpoint=self) + CompanyManagementitsolutionsIdUsagesListEndpoint( + client, parent_endpoint=self + ) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/managementItSolutions/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +42,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/managementItSolutions/{id}/usages endpoint. @@ -47,4 +54,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdUsagesListEndpoint.py index 1a396e29f..1cb5d47d5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyManagementItSolutionsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyManagementitsolutionsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/managementItSolutions/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/managementItSolutions/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsCountEndpoint.py index 8636544ff..bdf0a97ff 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyMarketdescriptionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/marketDescriptions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/marketDescriptions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsEndpoint.py index f3197940d..c92091209 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsCountEndpoint import CompanyMarketdescriptionsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsIdEndpoint import CompanyMarketdescriptionsIdEndpoint -from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsInfoEndpoint import CompanyMarketdescriptionsInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsCountEndpoint import ( + CompanyMarketdescriptionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsIdEndpoint import ( + CompanyMarketdescriptionsIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsInfoEndpoint import ( + CompanyMarketdescriptionsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MarketDescription from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyMarketdescriptionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "marketDescriptions", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyMarketdescriptionsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyMarketdescriptionsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyMarketdescriptionsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyMarketdescriptionsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyMarketdescriptionsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MarketDescription]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MarketDescription]: """ Performs a GET request against the /company/marketDescriptions endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MarketDescription]: The parsed response data. """ - return self._parse_many(MarketDescription, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MarketDescription, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketDescription: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketDescription: """ Performs a POST request against the /company/marketDescriptions endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MarketDescription: The parsed response data. """ - return self._parse_one(MarketDescription, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MarketDescription, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdEndpoint.py index 5c6b11683..e692397c2 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsIdInfoEndpoint import \ - CompanyMarketdescriptionsIdInfoEndpoint -from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsIdUsagesEndpoint import \ - CompanyMarketdescriptionsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsIdInfoEndpoint import ( + CompanyMarketdescriptionsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsIdUsagesEndpoint import ( + CompanyMarketdescriptionsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MarketDescription from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,10 +16,12 @@ class CompanyMarketdescriptionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyMarketdescriptionsIdInfoEndpoint(client, parent_endpoint=self)) self.usages = self._register_child_endpoint( CompanyMarketdescriptionsIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + CompanyMarketdescriptionsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -42,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketDescription: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketDescription: """ Performs a GET request against the /company/marketDescriptions/{id} endpoint. @@ -52,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MarketDescription: The parsed response data. """ - return self._parse_one(MarketDescription, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MarketDescription, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/marketDescriptions/{id} endpoint. @@ -64,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketDescription: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketDescription: """ Performs a PUT request against the /company/marketDescriptions/{id} endpoint. @@ -76,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MarketDescription: The parsed response data. """ - return self._parse_one(MarketDescription, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MarketDescription, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketDescription: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketDescription: """ Performs a PATCH request against the /company/marketDescriptions/{id} endpoint. @@ -88,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MarketDescription: The parsed response data. """ - return self._parse_one(MarketDescription, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MarketDescription, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdInfoEndpoint.py index 159824457..43b196df7 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketDescriptionInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketDescriptionInfo: """ Performs a GET request against the /company/marketDescriptions/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MarketDescriptionInfo: The parsed response data. """ - return self._parse_one(MarketDescriptionInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MarketDescriptionInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdUsagesEndpoint.py index c96e267d7..89fe07bf9 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsIdUsagesListEndpoint import \ - CompanyMarketdescriptionsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsIdUsagesListEndpoint import ( + CompanyMarketdescriptionsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): CompanyMarketdescriptionsIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/marketDescriptions/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/marketDescriptions/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdUsagesListEndpoint.py index 6e3a1ffd5..7107aeadd 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyMarketdescriptionsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/marketDescriptions/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/marketDescriptions/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsInfoCountEndpoint.py index 735e5156e..a9ecdb650 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyMarketdescriptionsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/marketDescriptions/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/marketDescriptions/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsInfoEndpoint.py index e1b556d3a..3502a23d3 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyMarketDescriptionsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsInfoCountEndpoint import \ - CompanyMarketdescriptionsInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyMarketdescriptionsInfoCountEndpoint import ( + CompanyMarketdescriptionsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MarketDescriptionInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MarketDescriptionInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MarketDescriptionInfo]: """ Performs a GET request against the /company/marketDescriptions/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MarketDescriptionInfo]: The parsed response data. """ - return self._parse_many(MarketDescriptionInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MarketDescriptionInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesCountEndpoint.py index 01a99561a..d6026f331 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesCountEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyNotetypesCountInfoEndpoint import CompanyNotetypesCountInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyNotetypesCountInfoEndpoint import ( + CompanyNotetypesCountInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Count from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyNotetypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyNotetypesCountInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyNotetypesCountInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/noteTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/noteTypes/count endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesCountInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesCountInfoEndpoint.py index 56324965b..72fbefe50 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesCountInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesCountInfoEndpoint.py @@ -10,7 +10,9 @@ class CompanyNotetypesCountInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/noteTypes/count/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/noteTypes/count/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesEndpoint.py index f85454ae4..705944367 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyNotetypesCountEndpoint import CompanyNotetypesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyNotetypesIdEndpoint import CompanyNotetypesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyNotetypesInfoEndpoint import CompanyNotetypesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyNotetypesCountEndpoint import ( + CompanyNotetypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyNotetypesIdEndpoint import ( + CompanyNotetypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyNotetypesInfoEndpoint import ( + CompanyNotetypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyNoteType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyNotetypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "noteTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyNotetypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyNotetypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyNotetypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyNotetypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyNotetypesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyNoteType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyNoteType]: """ Performs a GET request against the /company/noteTypes endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyNoteType]: The parsed response data. """ - return self._parse_many(CompanyNoteType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyNoteType, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyNoteType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyNoteType: """ Performs a POST request against the /company/noteTypes endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyNoteType: The parsed response data. """ - return self._parse_one(CompanyNoteType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CompanyNoteType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesIdEndpoint.py index a65a28a81..e014ecf93 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyNotetypesIdInfoEndpoint import CompanyNotetypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyNotetypesIdInfoEndpoint import ( + CompanyNotetypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CompanyNoteType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class CompanyNotetypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyNotetypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyNotetypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyNoteType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyNoteType: """ Performs a GET request against the /company/noteTypes/{id} endpoint. @@ -46,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyNoteType: The parsed response data. """ - return self._parse_one(CompanyNoteType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyNoteType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/noteTypes/{id} endpoint. @@ -58,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyNoteType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyNoteType: """ Performs a PUT request against the /company/noteTypes/{id} endpoint. @@ -70,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyNoteType: The parsed response data. """ - return self._parse_one(CompanyNoteType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CompanyNoteType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyNoteType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyNoteType: """ Performs a PATCH request against the /company/noteTypes/{id} endpoint. @@ -82,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyNoteType: The parsed response data. """ - return self._parse_one(CompanyNoteType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CompanyNoteType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesIdInfoEndpoint.py index 35a8e2d3c..1faa97791 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyNoteTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyNoteTypeInfo: """ Performs a GET request against the /company/noteTypes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyNoteTypeInfo: The parsed response data. """ - return self._parse_one(CompanyNoteTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyNoteTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesInfoEndpoint.py index f32cff09c..d3463ac55 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyNoteTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyNoteTypesInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CompanyNoteTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CompanyNoteTypeInfo]: """ Performs a GET request against the /company/noteTypes/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CompanyNoteTypeInfo]: The parsed response data. """ - return self._parse_many(CompanyNoteTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CompanyNoteTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesCountEndpoint.py index ca1035e42..cafbcd27b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyOwnershiptypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/ownershipTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/ownershipTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesEndpoint.py index 74e52c594..c28d3c4e7 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyOwnershiptypesCountEndpoint import CompanyOwnershiptypesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyOwnershiptypesIdEndpoint import CompanyOwnershiptypesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyOwnershiptypesInfoEndpoint import CompanyOwnershiptypesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyOwnershiptypesCountEndpoint import ( + CompanyOwnershiptypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyOwnershiptypesIdEndpoint import ( + CompanyOwnershiptypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyOwnershiptypesInfoEndpoint import ( + CompanyOwnershiptypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OwnershipType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyOwnershiptypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "ownershipTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyOwnershiptypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyOwnershiptypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyOwnershiptypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyOwnershiptypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyOwnershiptypesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OwnershipType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OwnershipType]: """ Performs a GET request against the /company/ownershipTypes endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OwnershipType]: The parsed response data. """ - return self._parse_many(OwnershipType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OwnershipType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OwnershipType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OwnershipType: """ Performs a POST request against the /company/ownershipTypes endpoint. @@ -74,4 +90,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OwnershipType: The parsed response data. """ - return self._parse_one(OwnershipType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + OwnershipType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesIdEndpoint.py index 3e75d4dfb..5a4388f36 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyOwnershiptypesIdInfoEndpoint import CompanyOwnershiptypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyOwnershiptypesIdInfoEndpoint import ( + CompanyOwnershiptypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OwnershipType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class CompanyOwnershiptypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyOwnershiptypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyOwnershiptypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OwnershipType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OwnershipType: """ Performs a GET request against the /company/ownershipTypes/{id} endpoint. @@ -46,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OwnershipType: The parsed response data. """ - return self._parse_one(OwnershipType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OwnershipType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/ownershipTypes/{id} endpoint. @@ -58,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OwnershipType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OwnershipType: """ Performs a PUT request against the /company/ownershipTypes/{id} endpoint. @@ -70,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OwnershipType: The parsed response data. """ - return self._parse_one(OwnershipType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OwnershipType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OwnershipType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OwnershipType: """ Performs a PATCH request against the /company/ownershipTypes/{id} endpoint. @@ -82,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OwnershipType: The parsed response data. """ - return self._parse_one(OwnershipType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OwnershipType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesIdInfoEndpoint.py index 2306eba96..da140018b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OwnershipTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OwnershipTypeInfo: """ Performs a GET request against the /company/ownershipTypes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OwnershipTypeInfo: The parsed response data. """ - return self._parse_one(OwnershipTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OwnershipTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesInfoCountEndpoint.py index f6cae4e24..da34852a2 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyOwnershiptypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/ownershipTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/ownershipTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesInfoEndpoint.py index 6c9337f08..e5c43cd0d 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyOwnershipTypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyOwnershiptypesInfoCountEndpoint import CompanyOwnershiptypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyOwnershiptypesInfoCountEndpoint import ( + CompanyOwnershiptypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OwnershipTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class CompanyOwnershiptypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyOwnershiptypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyOwnershiptypesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OwnershipTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OwnershipTypeInfo]: """ Performs a GET request against the /company/ownershipTypes/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OwnershipTypeInfo]: The parsed response data. """ - return self._parse_many(OwnershipTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OwnershipTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPaymentTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPaymentTypesInfoCountEndpoint.py index b0e645d8f..29ef52a14 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPaymentTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPaymentTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyPaymenttypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/paymentTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/paymentTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPaymenttypesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPaymenttypesEndpoint.py index d37a8a665..0f2d69bee 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPaymenttypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPaymenttypesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPaymenttypesInfoEndpoint import CompanyPaymenttypesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyPaymenttypesInfoEndpoint import ( + CompanyPaymenttypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyPaymenttypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "paymentTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyPaymenttypesInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + CompanyPaymenttypesInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPaymenttypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPaymenttypesInfoEndpoint.py index 38b1dfa16..bce286873 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPaymenttypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPaymenttypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPaymenttypesInfoCountEndpoint import CompanyPaymenttypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyPaymenttypesInfoCountEndpoint import ( + CompanyPaymenttypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class CompanyPaymenttypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyPaymenttypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyPaymenttypesInfoCountEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsCopyEndpoint.py index 981380728..50ee1c277 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsCopyEndpoint.py @@ -10,7 +10,9 @@ class CompanyPortalconfigurationsCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfiguration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfiguration: """ Performs a POST request against the /company/portalConfigurations/copy endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PortalConfiguration: The parsed response data. """ - return self._parse_one(PortalConfiguration, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PortalConfiguration, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsCountEndpoint.py index 27d809435..bad735c77 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyPortalconfigurationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/portalConfigurations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/portalConfigurations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsEndpoint.py index 8245c63b4..8590c5b34 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsEndpoint.py @@ -1,13 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsCopyEndpoint import \ - CompanyPortalconfigurationsCopyEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsCountEndpoint import \ - CompanyPortalconfigurationsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdEndpoint import CompanyPortalconfigurationsIdEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsInvoicesetupEndpoint import \ - CompanyPortalconfigurationsInvoicesetupEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsCopyEndpoint import ( + CompanyPortalconfigurationsCopyEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsCountEndpoint import ( + CompanyPortalconfigurationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdEndpoint import ( + CompanyPortalconfigurationsIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsInvoicesetupEndpoint import ( + CompanyPortalconfigurationsInvoicesetupEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalConfiguration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,15 +20,21 @@ class CompanyPortalconfigurationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "portalConfigurations", parent_endpoint=parent_endpoint) + super().__init__( + client, "portalConfigurations", parent_endpoint=parent_endpoint + ) self.invoice_setup = self._register_child_endpoint( - CompanyPortalconfigurationsInvoicesetupEndpoint(client, parent_endpoint=self) + CompanyPortalconfigurationsInvoicesetupEndpoint( + client, parent_endpoint=self + ) ) - self.copy = self._register_child_endpoint(CompanyPortalconfigurationsCopyEndpoint(client, parent_endpoint=self)) self.count = self._register_child_endpoint( CompanyPortalconfigurationsCountEndpoint(client, parent_endpoint=self) ) + self.copy = self._register_child_endpoint( + CompanyPortalconfigurationsCopyEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyPortalconfigurationsIdEndpoint: """ @@ -61,7 +72,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PortalConfiguration]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PortalConfiguration]: """ Performs a GET request against the /company/portalConfigurations endpoint. @@ -71,9 +84,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PortalConfiguration]: The parsed response data. """ - return self._parse_many(PortalConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PortalConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfiguration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfiguration: """ Performs a POST request against the /company/portalConfigurations endpoint. @@ -83,4 +101,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PortalConfiguration: The parsed response data. """ - return self._parse_one(PortalConfiguration, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PortalConfiguration, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdEndpoint.py index 3a66d9d8e..2ba32ac03 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdEndpoint.py @@ -1,16 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdInvoicesetupsEndpoint import \ - CompanyPortalconfigurationsIdInvoicesetupsEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdOpportunitysetupsEndpoint import \ - CompanyPortalconfigurationsIdOpportunitysetupsEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdPasswordemailsetupsEndpoint import \ - CompanyPortalconfigurationsIdPasswordemailsetupsEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdProjectsetupsEndpoint import \ - CompanyPortalconfigurationsIdProjectsetupsEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdServicesetupsEndpoint import \ - CompanyPortalconfigurationsIdServicesetupsEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdInvoicesetupsEndpoint import ( + CompanyPortalconfigurationsIdInvoicesetupsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdOpportunitysetupsEndpoint import ( + CompanyPortalconfigurationsIdOpportunitysetupsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdPasswordemailsetupsEndpoint import ( + CompanyPortalconfigurationsIdPasswordemailsetupsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdProjectsetupsEndpoint import ( + CompanyPortalconfigurationsIdProjectsetupsEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdServicesetupsEndpoint import ( + CompanyPortalconfigurationsIdServicesetupsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalConfiguration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,20 +25,30 @@ class CompanyPortalconfigurationsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.service_setups = self._register_child_endpoint( - CompanyPortalconfigurationsIdServicesetupsEndpoint(client, parent_endpoint=self) - ) - self.invoice_setups = self._register_child_endpoint( - CompanyPortalconfigurationsIdInvoicesetupsEndpoint(client, parent_endpoint=self) + self.opportunity_setups = self._register_child_endpoint( + CompanyPortalconfigurationsIdOpportunitysetupsEndpoint( + client, parent_endpoint=self + ) ) self.project_setups = self._register_child_endpoint( - CompanyPortalconfigurationsIdProjectsetupsEndpoint(client, parent_endpoint=self) + CompanyPortalconfigurationsIdProjectsetupsEndpoint( + client, parent_endpoint=self + ) ) - self.opportunity_setups = self._register_child_endpoint( - CompanyPortalconfigurationsIdOpportunitysetupsEndpoint(client, parent_endpoint=self) + self.invoice_setups = self._register_child_endpoint( + CompanyPortalconfigurationsIdInvoicesetupsEndpoint( + client, parent_endpoint=self + ) + ) + self.service_setups = self._register_child_endpoint( + CompanyPortalconfigurationsIdServicesetupsEndpoint( + client, parent_endpoint=self + ) ) self.password_email_setups = self._register_child_endpoint( - CompanyPortalconfigurationsIdPasswordemailsetupsEndpoint(client, parent_endpoint=self) + CompanyPortalconfigurationsIdPasswordemailsetupsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -59,7 +74,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfiguration: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfiguration: """ Performs a GET request against the /company/portalConfigurations/{id} endpoint. @@ -69,9 +86,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalConfiguration: The parsed response data. """ - return self._parse_one(PortalConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PortalConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/portalConfigurations/{id} endpoint. @@ -81,9 +103,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfiguration: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfiguration: """ Performs a PUT request against the /company/portalConfigurations/{id} endpoint. @@ -93,9 +120,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalConfiguration: The parsed response data. """ - return self._parse_one(PortalConfiguration, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PortalConfiguration, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfiguration: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfiguration: """ Performs a PATCH request against the /company/portalConfigurations/{id} endpoint. @@ -105,4 +137,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PortalConfiguration: The parsed response data. """ - return self._parse_one(PortalConfiguration, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PortalConfiguration, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsCountEndpoint.py index 274ab1207..256a21d48 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyPortalconfigurationsIdInvoicesetupsCountEndpoint(ConnectWiseEndpoin def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/portalConfigurations/{id}/invoiceSetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/portalConfigurations/{id}/invoiceSetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsEndpoint.py index 9b72fc610..2b30f5308 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdInvoicesetupsCountEndpoint import \ - CompanyPortalconfigurationsIdInvoicesetupsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint import \ - CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdInvoicesetupsCountEndpoint import ( + CompanyPortalconfigurationsIdInvoicesetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint import ( + CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalConfigurationInvoiceSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "invoiceSetups", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyPortalconfigurationsIdInvoicesetupsCountEndpoint(client, parent_endpoint=self) + CompanyPortalconfigurationsIdInvoicesetupsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint: Returns: CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint: The initialized CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint object. """ - child = CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyPortalconfigurationsIdInvoicesetupsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,5 +73,6 @@ def get( list[PortalConfigurationInvoiceSetup]: The parsed response data. """ return self._parse_many( - PortalConfigurationInvoiceSetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationInvoiceSetup, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsIdEndpoint.py index f2356284b..8e9fe355c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdInvoicesetupsIdTesttransactionEndpoint import \ - CompanyPortalconfigurationsIdInvoicesetupsIdTesttransactionEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdInvoicesetupsIdTesttransactionEndpoint import ( + CompanyPortalconfigurationsIdInvoicesetupsIdTesttransactionEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalConfigurationInvoiceSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.test_transaction = self._register_child_endpoint( - CompanyPortalconfigurationsIdInvoicesetupsIdTesttransactionEndpoint(client, parent_endpoint=self) + CompanyPortalconfigurationsIdInvoicesetupsIdTesttransactionEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationInvoiceSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationInvoiceSetup: """ Performs a GET request against the /company/portalConfigurations/{id}/invoiceSetups/{id} endpoint. @@ -50,10 +55,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationInvoiceSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationInvoiceSetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationInvoiceSetup, + super()._make_request("GET", data=data, params=params).json(), ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationInvoiceSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationInvoiceSetup: """ Performs a PUT request against the /company/portalConfigurations/{id}/invoiceSetups/{id} endpoint. @@ -64,10 +72,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationInvoiceSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationInvoiceSetup, super()._make_request("PUT", data=data, params=params).json() + PortalConfigurationInvoiceSetup, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationInvoiceSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationInvoiceSetup: """ Performs a PATCH request against the /company/portalConfigurations/{id}/invoiceSetups/{id} endpoint. @@ -78,5 +89,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationInvoiceSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationInvoiceSetup, super()._make_request("PATCH", data=data, params=params).json() + PortalConfigurationInvoiceSetup, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsIdTestTransactionEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsIdTestTransactionEndpoint.py index 715b185ff..de74aa6d5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsIdTestTransactionEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdInvoiceSetupsIdTestTransactionEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyPortalconfigurationsIdInvoicesetupsIdTesttransactionEndpoint(ConnectWiseEndpoint): +class CompanyPortalconfigurationsIdInvoicesetupsIdTesttransactionEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "testTransaction", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /company/portalConfigurations/{id}/invoiceSetups/{id}/testTransaction endpoint. @@ -20,4 +24,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdOpportunitySetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdOpportunitySetupsEndpoint.py index e6d92b3de..bcdc63785 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdOpportunitySetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdOpportunitySetupsEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdOpportunitysetupsIdEndpoint import \ - CompanyPortalconfigurationsIdOpportunitysetupsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdOpportunitysetupsIdEndpoint import ( + CompanyPortalconfigurationsIdOpportunitysetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalConfigurationOpportunitySetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,7 +22,9 @@ def id(self, id: int) -> CompanyPortalconfigurationsIdOpportunitysetupsIdEndpoin Returns: CompanyPortalconfigurationsIdOpportunitysetupsIdEndpoint: The initialized CompanyPortalconfigurationsIdOpportunitysetupsIdEndpoint object. """ - child = CompanyPortalconfigurationsIdOpportunitysetupsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyPortalconfigurationsIdOpportunitysetupsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -61,10 +64,13 @@ def get( list[PortalConfigurationOpportunitySetup]: The parsed response data. """ return self._parse_many( - PortalConfigurationOpportunitySetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationOpportunitySetup, + super()._make_request("GET", data=data, params=params).json(), ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationOpportunitySetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationOpportunitySetup: """ Performs a PUT request against the /company/portalConfigurations/{id}/opportunitySetups endpoint. @@ -75,7 +81,8 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationOpportunitySetup: The parsed response data. """ return self._parse_one( - PortalConfigurationOpportunitySetup, super()._make_request("PUT", data=data, params=params).json() + PortalConfigurationOpportunitySetup, + super()._make_request("PUT", data=data, params=params).json(), ) def patch( @@ -91,5 +98,6 @@ def patch( PortalConfigurationOpportunitySetup: The parsed response data. """ return self._parse_one( - PortalConfigurationOpportunitySetup, super()._make_request("PATCH", data=data, params=params).json() + PortalConfigurationOpportunitySetup, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdOpportunitySetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdOpportunitySetupsIdEndpoint.py index a3567a6dc..e61f8e31e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdOpportunitySetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdOpportunitySetupsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationOpportunitySetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationOpportunitySetup: """ Performs a GET request against the /company/portalConfigurations/{id}/opportunitySetups/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationOpportunitySetup: The parsed response data. """ return self._parse_one( - PortalConfigurationOpportunitySetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationOpportunitySetup, + super()._make_request("GET", data=data, params=params).json(), ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationOpportunitySetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationOpportunitySetup: """ Performs a PUT request against the /company/portalConfigurations/{id}/opportunitySetups/{id} endpoint. @@ -58,7 +63,8 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationOpportunitySetup: The parsed response data. """ return self._parse_one( - PortalConfigurationOpportunitySetup, super()._make_request("PUT", data=data, params=params).json() + PortalConfigurationOpportunitySetup, + super()._make_request("PUT", data=data, params=params).json(), ) def patch( @@ -74,5 +80,6 @@ def patch( PortalConfigurationOpportunitySetup: The parsed response data. """ return self._parse_one( - PortalConfigurationOpportunitySetup, super()._make_request("PATCH", data=data, params=params).json() + PortalConfigurationOpportunitySetup, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdPasswordEmailSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdPasswordEmailSetupsEndpoint.py index 778372f0b..2c1e15202 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdPasswordEmailSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdPasswordEmailSetupsEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdPasswordemailsetupsIdEndpoint import \ - CompanyPortalconfigurationsIdPasswordemailsetupsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdPasswordemailsetupsIdEndpoint import ( + CompanyPortalconfigurationsIdPasswordemailsetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalConfigurationPasswordEmailSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,7 +22,9 @@ def id(self, id: int) -> CompanyPortalconfigurationsIdPasswordemailsetupsIdEndpo Returns: CompanyPortalconfigurationsIdPasswordemailsetupsIdEndpoint: The initialized CompanyPortalconfigurationsIdPasswordemailsetupsIdEndpoint object. """ - child = CompanyPortalconfigurationsIdPasswordemailsetupsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyPortalconfigurationsIdPasswordemailsetupsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -61,5 +64,6 @@ def get( list[PortalConfigurationPasswordEmailSetup]: The parsed response data. """ return self._parse_many( - PortalConfigurationPasswordEmailSetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationPasswordEmailSetup, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdPasswordEmailSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdPasswordEmailSetupsIdEndpoint.py index 002dc2d35..b694490b6 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdPasswordEmailSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdPasswordEmailSetupsIdEndpoint.py @@ -46,7 +46,8 @@ def get( PortalConfigurationPasswordEmailSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationPasswordEmailSetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationPasswordEmailSetup, + super()._make_request("GET", data=data, params=params).json(), ) def put( @@ -62,7 +63,8 @@ def put( PortalConfigurationPasswordEmailSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationPasswordEmailSetup, super()._make_request("PUT", data=data, params=params).json() + PortalConfigurationPasswordEmailSetup, + super()._make_request("PUT", data=data, params=params).json(), ) def patch( @@ -78,5 +80,6 @@ def patch( PortalConfigurationPasswordEmailSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationPasswordEmailSetup, super()._make_request("PATCH", data=data, params=params).json() + PortalConfigurationPasswordEmailSetup, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsCountEndpoint.py index 897fdfcd5..98a3e0a9f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyPortalconfigurationsIdProjectsetupsCountEndpoint(ConnectWiseEndpoin def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/portalConfigurations/{id}/projectSetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/portalConfigurations/{id}/projectSetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsEndpoint.py index b13bc964d..8a8ddc978 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdProjectsetupsCountEndpoint import \ - CompanyPortalconfigurationsIdProjectsetupsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdProjectsetupsIdEndpoint import \ - CompanyPortalconfigurationsIdProjectsetupsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdProjectsetupsCountEndpoint import ( + CompanyPortalconfigurationsIdProjectsetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdProjectsetupsIdEndpoint import ( + CompanyPortalconfigurationsIdProjectsetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalConfigurationProjectSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "projectSetups", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyPortalconfigurationsIdProjectsetupsCountEndpoint(client, parent_endpoint=self) + CompanyPortalconfigurationsIdProjectsetupsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyPortalconfigurationsIdProjectsetupsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyPortalconfigurationsIdProjectsetupsIdEndpoint: Returns: CompanyPortalconfigurationsIdProjectsetupsIdEndpoint: The initialized CompanyPortalconfigurationsIdProjectsetupsIdEndpoint object. """ - child = CompanyPortalconfigurationsIdProjectsetupsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyPortalconfigurationsIdProjectsetupsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,5 +73,6 @@ def get( list[PortalConfigurationProjectSetup]: The parsed response data. """ return self._parse_many( - PortalConfigurationProjectSetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationProjectSetup, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsIdEndpoint.py index a30ae87b3..5a5fe3eca 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdProjectSetupsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationProjectSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationProjectSetup: """ Performs a GET request against the /company/portalConfigurations/{id}/projectSetups/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationProjectSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationProjectSetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationProjectSetup, + super()._make_request("GET", data=data, params=params).json(), ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationProjectSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationProjectSetup: """ Performs a PUT request against the /company/portalConfigurations/{id}/projectSetups/{id} endpoint. @@ -58,10 +63,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationProjectSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationProjectSetup, super()._make_request("PUT", data=data, params=params).json() + PortalConfigurationProjectSetup, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationProjectSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationProjectSetup: """ Performs a PATCH request against the /company/portalConfigurations/{id}/projectSetups/{id} endpoint. @@ -72,5 +80,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationProjectSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationProjectSetup, super()._make_request("PATCH", data=data, params=params).json() + PortalConfigurationProjectSetup, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsCountEndpoint.py index 65a7ecad9..ec3622dd5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyPortalconfigurationsIdServicesetupsCountEndpoint(ConnectWiseEndpoin def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/portalConfigurations/{id}/serviceSetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/portalConfigurations/{id}/serviceSetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsEndpoint.py index 541b1fb81..73eeb1fe0 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdServicesetupsCountEndpoint import \ - CompanyPortalconfigurationsIdServicesetupsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdServicesetupsIdEndpoint import \ - CompanyPortalconfigurationsIdServicesetupsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdServicesetupsCountEndpoint import ( + CompanyPortalconfigurationsIdServicesetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsIdServicesetupsIdEndpoint import ( + CompanyPortalconfigurationsIdServicesetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalConfigurationServiceSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "serviceSetups", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyPortalconfigurationsIdServicesetupsCountEndpoint(client, parent_endpoint=self) + CompanyPortalconfigurationsIdServicesetupsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> CompanyPortalconfigurationsIdServicesetupsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyPortalconfigurationsIdServicesetupsIdEndpoint: Returns: CompanyPortalconfigurationsIdServicesetupsIdEndpoint: The initialized CompanyPortalconfigurationsIdServicesetupsIdEndpoint object. """ - child = CompanyPortalconfigurationsIdServicesetupsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyPortalconfigurationsIdServicesetupsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,5 +73,6 @@ def get( list[PortalConfigurationServiceSetup]: The parsed response data. """ return self._parse_many( - PortalConfigurationServiceSetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationServiceSetup, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsIdEndpoint.py index efd0dd884..5241d74f5 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsIdServiceSetupsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationServiceSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationServiceSetup: """ Performs a GET request against the /company/portalConfigurations/{id}/serviceSetups/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationServiceSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationServiceSetup, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationServiceSetup, + super()._make_request("GET", data=data, params=params).json(), ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationServiceSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationServiceSetup: """ Performs a PUT request against the /company/portalConfigurations/{id}/serviceSetups/{id} endpoint. @@ -58,10 +63,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationServiceSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationServiceSetup, super()._make_request("PUT", data=data, params=params).json() + PortalConfigurationServiceSetup, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationServiceSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationServiceSetup: """ Performs a PATCH request against the /company/portalConfigurations/{id}/serviceSetups/{id} endpoint. @@ -72,5 +80,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationServiceSetup: The parsed response data. """ return self._parse_one( - PortalConfigurationServiceSetup, super()._make_request("PATCH", data=data, params=params).json() + PortalConfigurationServiceSetup, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsCountEndpoint.py index 08da3fd88..719c1da07 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyPortalconfigurationsInvoicesetupPaymentprocessorsCountEndpoint(ConnectWiseEndpoint): +class CompanyPortalconfigurationsInvoicesetupPaymentprocessorsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/portalConfigurations/invoiceSetup/paymentProcessors/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/portalConfigurations/invoiceSetup/paymentProcessors/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsEndpoint.py index f6ad67c03..edb82915d 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsEndpoint.py @@ -1,24 +1,32 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsInvoicesetupPaymentprocessorsCountEndpoint import \ - CompanyPortalconfigurationsInvoicesetupPaymentprocessorsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint import \ - CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsInvoicesetupPaymentprocessorsCountEndpoint import ( + CompanyPortalconfigurationsInvoicesetupPaymentprocessorsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint import ( + CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalConfigurationPaymentProcessor from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyPortalconfigurationsInvoicesetupPaymentprocessorsEndpoint(ConnectWiseEndpoint): +class CompanyPortalconfigurationsInvoicesetupPaymentprocessorsEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "paymentProcessors", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - CompanyPortalconfigurationsInvoicesetupPaymentprocessorsCountEndpoint(client, parent_endpoint=self) + CompanyPortalconfigurationsInvoicesetupPaymentprocessorsCountEndpoint( + client, parent_endpoint=self + ) ) - def id(self, id: int) -> CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint: + def id( + self, id: int + ) -> CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint: """ Sets the ID for this endpoint and returns an initialized CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint object to move down the chain. @@ -27,7 +35,9 @@ def id(self, id: int) -> CompanyPortalconfigurationsInvoicesetupPaymentprocessor Returns: CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint: The initialized CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint object. """ - child = CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,5 +77,6 @@ def get( list[PortalConfigurationPaymentProcessor]: The parsed response data. """ return self._parse_many( - PortalConfigurationPaymentProcessor, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationPaymentProcessor, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsIdEndpoint.py index da8008b9b..9ca81e5f1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalConfigurationsInvoiceSetupPaymentProcessorsIdEndpoint.py @@ -6,7 +6,9 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint(ConnectWiseEndpoint): +class CompanyPortalconfigurationsInvoicesetupPaymentprocessorsIdEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalConfigurationPaymentProcessor: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalConfigurationPaymentProcessor: """ Performs a GET request against the /company/portalConfigurations/invoiceSetup/paymentProcessors/{id} endpoint. @@ -44,5 +48,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PortalConfigurationPaymentProcessor: The parsed response data. """ return self._parse_one( - PortalConfigurationPaymentProcessor, super()._make_request("GET", data=data, params=params).json() + PortalConfigurationPaymentProcessor, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsCountEndpoint.py index 7f417ecfe..06634817a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyPortalsecuritylevelsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/portalSecurityLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/portalSecurityLevels/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsEndpoint.py index 1a71a8d05..8356c9e9a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalsecuritylevelsCountEndpoint import \ - CompanyPortalsecuritylevelsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalsecuritylevelsIdEndpoint import CompanyPortalsecuritylevelsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalsecuritylevelsCountEndpoint import ( + CompanyPortalsecuritylevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalsecuritylevelsIdEndpoint import ( + CompanyPortalsecuritylevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalSecurityLevel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +14,9 @@ class CompanyPortalsecuritylevelsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "portalSecurityLevels", parent_endpoint=parent_endpoint) + super().__init__( + client, "portalSecurityLevels", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( CompanyPortalsecuritylevelsCountEndpoint(client, parent_endpoint=self) @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PortalSecurityLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PortalSecurityLevel]: """ Performs a GET request against the /company/portalSecurityLevels endpoint. @@ -63,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PortalSecurityLevel]: The parsed response data. """ - return self._parse_many(PortalSecurityLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PortalSecurityLevel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsIdEndpoint.py index b0e5df131..9ef1fdd9f 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalSecurityLevelsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalSecurityLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalSecurityLevel: """ Performs a GET request against the /company/portalSecurityLevels/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalSecurityLevel: The parsed response data. """ - return self._parse_one(PortalSecurityLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PortalSecurityLevel, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalSecurityLevel: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalSecurityLevel: """ Performs a PUT request against the /company/portalSecurityLevels/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalSecurityLevel: The parsed response data. """ - return self._parse_one(PortalSecurityLevel, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PortalSecurityLevel, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalSecurityLevel: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalSecurityLevel: """ Performs a PATCH request against the /company/portalSecurityLevels/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PortalSecurityLevel: The parsed response data. """ - return self._parse_one(PortalSecurityLevel, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PortalSecurityLevel, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsCountEndpoint.py index ea79dfa28..6b1f6ad30 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyPortalsecuritysettingsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/portalSecuritySettings/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/portalSecuritySettings/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsEndpoint.py index 423aa9d71..0ddc76355 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalsecuritysettingsCountEndpoint import \ - CompanyPortalsecuritysettingsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalsecuritysettingsIdEndpoint import \ - CompanyPortalsecuritysettingsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalsecuritysettingsCountEndpoint import ( + CompanyPortalsecuritysettingsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyPortalsecuritysettingsIdEndpoint import ( + CompanyPortalsecuritysettingsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalSecuritySetting from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class CompanyPortalsecuritysettingsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "portalSecuritySettings", parent_endpoint=parent_endpoint) + super().__init__( + client, "portalSecuritySettings", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( CompanyPortalsecuritysettingsCountEndpoint(client, parent_endpoint=self) @@ -27,7 +31,9 @@ def id(self, id: int) -> CompanyPortalsecuritysettingsIdEndpoint: Returns: CompanyPortalsecuritysettingsIdEndpoint: The initialized CompanyPortalsecuritysettingsIdEndpoint object. """ - child = CompanyPortalsecuritysettingsIdEndpoint(self.client, parent_endpoint=self) + child = CompanyPortalsecuritysettingsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PortalSecuritySetting]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PortalSecuritySetting]: """ Performs a GET request against the /company/portalSecuritySettings endpoint. @@ -64,4 +72,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PortalSecuritySetting]: The parsed response data. """ - return self._parse_many(PortalSecuritySetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PortalSecuritySetting, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsIdEndpoint.py index 95b27372b..aa9451513 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalSecuritySettingsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalSecuritySetting: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalSecuritySetting: """ Performs a GET request against the /company/portalSecuritySettings/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalSecuritySetting: The parsed response data. """ - return self._parse_one(PortalSecuritySetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PortalSecuritySetting, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalSecuritySetting: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalSecuritySetting: """ Performs a PUT request against the /company/portalSecuritySettings/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalSecuritySetting: The parsed response data. """ - return self._parse_one(PortalSecuritySetting, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PortalSecuritySetting, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalSecuritySetting: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalSecuritySetting: """ Performs a PATCH request against the /company/portalSecuritySettings/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PortalSecuritySetting: The parsed response data. """ - return self._parse_one(PortalSecuritySetting, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PortalSecuritySetting, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyPortalconfigurationsInvoicesetupEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyPortalconfigurationsInvoicesetupEndpoint.py index 8724cfdef..107f86467 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyPortalconfigurationsInvoicesetupEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyPortalconfigurationsInvoicesetupEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsInvoicesetupPaymentprocessorsEndpoint import \ - CompanyPortalconfigurationsInvoicesetupPaymentprocessorsEndpoint +from pyconnectwise.endpoints.manage.CompanyPortalconfigurationsInvoicesetupPaymentprocessorsEndpoint import ( + CompanyPortalconfigurationsInvoicesetupPaymentprocessorsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,5 +13,7 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "invoiceSetup", parent_endpoint=parent_endpoint) self.payment_processors = self._register_child_endpoint( - CompanyPortalconfigurationsInvoicesetupPaymentprocessorsEndpoint(client, parent_endpoint=self) + CompanyPortalconfigurationsInvoicesetupPaymentprocessorsEndpoint( + client, parent_endpoint=self + ) ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyStatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyStatesCountEndpoint.py index 0caa568db..d9635fa4b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyStatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyStatesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyStatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/states/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/states/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyStatesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyStatesEndpoint.py index d43f3c7ec..0c0cc70e1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyStatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyStatesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyStatesCountEndpoint import CompanyStatesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyStatesIdEndpoint import CompanyStatesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyStatesInfoEndpoint import CompanyStatesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyStatesCountEndpoint import ( + CompanyStatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyStatesIdEndpoint import ( + CompanyStatesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyStatesInfoEndpoint import ( + CompanyStatesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import State from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyStatesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "states", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyStatesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyStatesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyStatesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyStatesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyStatesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> CompanyStatesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[State]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[State]: """ Performs a GET request against the /company/states endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[State]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[State]: """ Performs a GET request against the /company/states endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[State]: The parsed response data. """ - return self._parse_many(State, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + State, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> State: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> State: """ Performs a POST request against the /company/states endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: State: The parsed response data. """ - return self._parse_one(State, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + State, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyStatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyStatesIdEndpoint.py index 73ff5f8ab..29e16cb44 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyStatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyStatesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyStatesIdInfoEndpoint import CompanyStatesIdInfoEndpoint -from pyconnectwise.endpoints.manage.CompanyStatesIdUsagesEndpoint import CompanyStatesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyStatesIdInfoEndpoint import ( + CompanyStatesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyStatesIdUsagesEndpoint import ( + CompanyStatesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import State from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class CompanyStatesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyStatesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(CompanyStatesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + CompanyStatesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyStatesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[State]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[State]: """ Performs a GET request against the /company/states/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> State: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> State: """ Performs a GET request against the /company/states/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: State: The parsed response data. """ - return self._parse_one(State, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + State, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> State: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> State: """ Performs a PUT request against the /company/states/{id} endpoint. @@ -58,9 +74,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: State: The parsed response data. """ - return self._parse_one(State, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + State, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> State: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> State: """ Performs a PATCH request against the /company/states/{id} endpoint. @@ -70,9 +90,13 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: State: The parsed response data. """ - return self._parse_one(State, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + State, super()._make_request("PATCH", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/states/{id} endpoint. @@ -82,4 +106,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyStatesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyStatesIdInfoEndpoint.py index a4fd8683e..7f1f7f3d8 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyStatesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyStatesIdInfoEndpoint.py @@ -10,7 +10,9 @@ class CompanyStatesIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[StateInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[StateInfo]: """ Performs a GET request against the /company/states/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> StateInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> StateInfo: """ Performs a GET request against the /company/states/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: StateInfo: The parsed response data. """ - return self._parse_one(StateInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + StateInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyStatesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyStatesIdUsagesEndpoint.py index 71dfb1f15..4198ec583 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyStatesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyStatesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyStatesIdUsagesListEndpoint import CompanyStatesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyStatesIdUsagesListEndpoint import ( + CompanyStatesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyStatesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(CompanyStatesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + CompanyStatesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/states/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/states/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyStatesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyStatesIdUsagesListEndpoint.py index 17fcdc364..049ecd252 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyStatesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyStatesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyStatesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/states/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/states/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyStatesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyStatesInfoCountEndpoint.py index 8e8d7f1dc..aa1076854 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyStatesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyStatesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyStatesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/states/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/states/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyStatesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyStatesInfoEndpoint.py index b6a1421e4..8ea5c7c06 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyStatesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyStatesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyStatesInfoCountEndpoint import CompanyStatesInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyStatesInfoCountEndpoint import ( + CompanyStatesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import StateInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyStatesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyStatesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyStatesInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[StateInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[StateInfo]: """ Performs a GET request against the /company/states/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[StateInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[StateInfo]: """ Performs a GET request against the /company/states/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[StateInfo]: The parsed response data. """ - return self._parse_many(StateInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + StateInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesCountEndpoint.py index 38c9aac4c..dae38be5b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyTeamrolesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/teamRoles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/teamRoles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesEndpoint.py index 0fd9dc686..f7b7b0f3c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyTeamrolesCountEndpoint import CompanyTeamrolesCountEndpoint -from pyconnectwise.endpoints.manage.CompanyTeamrolesIdEndpoint import CompanyTeamrolesIdEndpoint -from pyconnectwise.endpoints.manage.CompanyTeamrolesInfoEndpoint import CompanyTeamrolesInfoEndpoint +from pyconnectwise.endpoints.manage.CompanyTeamrolesCountEndpoint import ( + CompanyTeamrolesCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyTeamrolesIdEndpoint import ( + CompanyTeamrolesIdEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyTeamrolesInfoEndpoint import ( + CompanyTeamrolesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TeamRole from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class CompanyTeamrolesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "teamRoles", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyTeamrolesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(CompanyTeamrolesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyTeamrolesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyTeamrolesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyTeamrolesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> CompanyTeamrolesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TeamRole]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TeamRole]: """ Performs a GET request against the /company/teamRoles endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TeamRole]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TeamRole]: """ Performs a GET request against the /company/teamRoles endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TeamRole]: The parsed response data. """ - return self._parse_many(TeamRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TeamRole, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TeamRole: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TeamRole: """ Performs a POST request against the /company/teamRoles endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TeamRole: The parsed response data. """ - return self._parse_one(TeamRole, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TeamRole, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdEndpoint.py index e944818c5..bec35985c 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyTeamrolesIdInfoEndpoint import CompanyTeamrolesIdInfoEndpoint -from pyconnectwise.endpoints.manage.CompanyTeamrolesIdUsagesEndpoint import CompanyTeamrolesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.CompanyTeamrolesIdInfoEndpoint import ( + CompanyTeamrolesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyTeamrolesIdUsagesEndpoint import ( + CompanyTeamrolesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TeamRole from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class CompanyTeamrolesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(CompanyTeamrolesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(CompanyTeamrolesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + CompanyTeamrolesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + CompanyTeamrolesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TeamRole]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TeamRole]: """ Performs a GET request against the /company/teamRoles/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TeamRole: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TeamRole: """ Performs a GET request against the /company/teamRoles/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TeamRole: The parsed response data. """ - return self._parse_one(TeamRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TeamRole, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/teamRoles/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TeamRole: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TeamRole: """ Performs a PUT request against the /company/teamRoles/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TeamRole: The parsed response data. """ - return self._parse_one(TeamRole, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TeamRole, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TeamRole: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TeamRole: """ Performs a PATCH request against the /company/teamRoles/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TeamRole: The parsed response data. """ - return self._parse_one(TeamRole, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TeamRole, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdInfoEndpoint.py index ab2ea4186..c1789c5a1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TeamRoleInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TeamRoleInfo: """ Performs a GET request against the /company/teamRoles/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TeamRoleInfo: The parsed response data. """ - return self._parse_one(TeamRoleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TeamRoleInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdUsagesEndpoint.py index 7cebdfef2..f6677865a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyTeamrolesIdUsagesListEndpoint import CompanyTeamrolesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.CompanyTeamrolesIdUsagesListEndpoint import ( + CompanyTeamrolesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyTeamrolesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(CompanyTeamrolesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + CompanyTeamrolesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/teamRoles/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/teamRoles/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdUsagesListEndpoint.py index 6163245d5..fd05642f1 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class CompanyTeamrolesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /company/teamRoles/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /company/teamRoles/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesInfoCountEndpoint.py index 08c0dbc87..b74b7b8ff 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyTeamrolesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/teamRoles/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/teamRoles/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesInfoEndpoint.py index 78dbfdd1e..b5d0b968a 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTeamRolesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTeamRolesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyTeamrolesInfoCountEndpoint import CompanyTeamrolesInfoCountEndpoint +from pyconnectwise.endpoints.manage.CompanyTeamrolesInfoCountEndpoint import ( + CompanyTeamrolesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TeamRoleInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class CompanyTeamrolesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyTeamrolesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyTeamrolesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TeamRoleInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TeamRoleInfo]: """ Performs a GET request against the /company/teamRoles/info endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TeamRoleInfo]: The parsed response data. """ - return self._parse_many(TeamRoleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TeamRoleInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTracksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTracksCountEndpoint.py index 24c5d4ab0..9d5fe334b 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTracksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTracksCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyTracksCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/tracks/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/tracks/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTracksEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTracksEndpoint.py index 2df85e346..32bffb3e4 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTracksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTracksEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyTracksCountEndpoint import CompanyTracksCountEndpoint -from pyconnectwise.endpoints.manage.CompanyTracksIdEndpoint import CompanyTracksIdEndpoint +from pyconnectwise.endpoints.manage.CompanyTracksCountEndpoint import ( + CompanyTracksCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyTracksIdEndpoint import ( + CompanyTracksIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Track from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyTracksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tracks", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyTracksCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyTracksCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyTracksIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyTracksIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Track]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Track]: """ Performs a GET request against the /company/tracks endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Track]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Track]: """ Performs a GET request against the /company/tracks endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Track]: The parsed response data. """ - return self._parse_many(Track, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Track, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Track: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Track: """ Performs a POST request against the /company/tracks endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Track: The parsed response data. """ - return self._parse_one(Track, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Track, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsCountEndpoint.py index 3eff19a9f..42a943c97 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsCountEndpoint.py @@ -10,7 +10,9 @@ class CompanyTracksIdActionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /company/tracks/{id}/actions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /company/tracks/{id}/actions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsEndpoint.py index d9c4c5495..21304201e 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyTracksIdActionsCountEndpoint import CompanyTracksIdActionsCountEndpoint -from pyconnectwise.endpoints.manage.CompanyTracksIdActionsIdEndpoint import CompanyTracksIdActionsIdEndpoint +from pyconnectwise.endpoints.manage.CompanyTracksIdActionsCountEndpoint import ( + CompanyTracksIdActionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.CompanyTracksIdActionsIdEndpoint import ( + CompanyTracksIdActionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TrackAction from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class CompanyTracksIdActionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "actions", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(CompanyTracksIdActionsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + CompanyTracksIdActionsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> CompanyTracksIdActionsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> CompanyTracksIdActionsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TrackAction]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TrackAction]: """ Performs a GET request against the /company/tracks/{id}/actions endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TrackAction]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TrackAction]: """ Performs a GET request against the /company/tracks/{id}/actions endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TrackAction]: The parsed response data. """ - return self._parse_many(TrackAction, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TrackAction, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TrackAction: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TrackAction: """ Performs a POST request against the /company/tracks/{id}/actions endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TrackAction: The parsed response data. """ - return self._parse_one(TrackAction, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TrackAction, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsIdEndpoint.py index f78022f8d..26d0fa0ac 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTracksIdActionsIdEndpoint.py @@ -10,7 +10,9 @@ class CompanyTracksIdActionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TrackAction]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TrackAction]: """ Performs a GET request against the /company/tracks/{id}/actions/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TrackAction: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TrackAction: """ Performs a GET request against the /company/tracks/{id}/actions/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TrackAction: The parsed response data. """ - return self._parse_one(TrackAction, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TrackAction, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TrackAction: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TrackAction: """ Performs a PUT request against the /company/tracks/{id}/actions/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TrackAction: The parsed response data. """ - return self._parse_one(TrackAction, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TrackAction, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TrackAction: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TrackAction: """ Performs a PATCH request against the /company/tracks/{id}/actions/{id} endpoint. @@ -65,9 +77,13 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TrackAction: The parsed response data. """ - return self._parse_one(TrackAction, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TrackAction, super()._make_request("PATCH", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/tracks/{id}/actions/{id} endpoint. @@ -77,4 +93,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/CompanyTracksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/CompanyTracksIdEndpoint.py index 11826489a..a5d03b880 100644 --- a/src/pyconnectwise/endpoints/manage/CompanyTracksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/CompanyTracksIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.CompanyTracksIdActionsEndpoint import CompanyTracksIdActionsEndpoint +from pyconnectwise.endpoints.manage.CompanyTracksIdActionsEndpoint import ( + CompanyTracksIdActionsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Track from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class CompanyTracksIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.actions = self._register_child_endpoint(CompanyTracksIdActionsEndpoint(client, parent_endpoint=self)) + self.actions = self._register_child_endpoint( + CompanyTracksIdActionsEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Track]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Track]: """ Performs a GET request against the /company/tracks/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Track: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Track: """ Performs a GET request against the /company/tracks/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: Track: The parsed response data. """ - return self._parse_one(Track, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Track, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /company/tracks/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Track: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Track: """ Performs a PUT request against the /company/tracks/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: Track: The parsed response data. """ - return self._parse_one(Track, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Track, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Track: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Track: """ Performs a PATCH request against the /company/tracks/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Track: The parsed response data. """ - return self._parse_one(Track, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Track, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsEndpoint.py index 152b43e2e..dcca4cf05 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesEndpoint import ConfigurationsTypesEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesEndpoint import ( + ConfigurationsTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ConfigurationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "configurations", parent_endpoint=parent_endpoint) - self.types = self._register_child_endpoint(ConfigurationsTypesEndpoint(client, parent_endpoint=self)) + self.types = self._register_child_endpoint( + ConfigurationsTypesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesEndpoint.py index 6702d303e..ceebcfb49 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdEndpoint import ConfigurationsTypesIdEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesInfoEndpoint import ConfigurationsTypesInfoEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdEndpoint import ( + ConfigurationsTypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ConfigurationsTypesInfoEndpoint import ( + ConfigurationsTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class ConfigurationsTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ConfigurationsTypesInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ConfigurationsTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ConfigurationsTypesIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdEndpoint.py index 0c7934a94..ab1e5bd1c 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsEndpoint import ConfigurationsTypesIdQuestionsEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsEndpoint import ( + ConfigurationsTypesIdQuestionsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsEndpoint.py index 6022fa7c2..e2ae2679a 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdEndpoint import \ - ConfigurationsTypesIdQuestionsIdEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsInfoEndpoint import \ - ConfigurationsTypesIdQuestionsInfoEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdEndpoint import ( + ConfigurationsTypesIdQuestionsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsInfoEndpoint import ( + ConfigurationsTypesIdQuestionsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,6 +28,8 @@ def id(self, id: int) -> ConfigurationsTypesIdQuestionsIdEndpoint: Returns: ConfigurationsTypesIdQuestionsIdEndpoint: The initialized ConfigurationsTypesIdQuestionsIdEndpoint object. """ - child = ConfigurationsTypesIdQuestionsIdEndpoint(self.client, parent_endpoint=self) + child = ConfigurationsTypesIdQuestionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdEndpoint.py index fb43bfce4..885fa29fe 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdInfoEndpoint import \ - ConfigurationsTypesIdQuestionsIdInfoEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesEndpoint import \ - ConfigurationsTypesIdQuestionsIdValuesEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdInfoEndpoint import ( + ConfigurationsTypesIdQuestionsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesEndpoint import ( + ConfigurationsTypesIdQuestionsIdValuesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,9 +15,9 @@ class ConfigurationsTypesIdQuestionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - ConfigurationsTypesIdQuestionsIdInfoEndpoint(client, parent_endpoint=self) - ) self.values = self._register_child_endpoint( ConfigurationsTypesIdQuestionsIdValuesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ConfigurationsTypesIdQuestionsIdInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdInfoEndpoint.py index b5f85876f..56acfb518 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestionInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestionInfo: """ Performs a GET request against the /configurations/types/{id}/questions/{id}/info endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C ConfigurationTypeQuestionInfo: The parsed response data. """ return self._parse_one( - ConfigurationTypeQuestionInfo, super()._make_request("GET", data=data, params=params).json() + ConfigurationTypeQuestionInfo, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesEndpoint.py index a92112513..9a2fdcaff 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesIdEndpoint import \ - ConfigurationsTypesIdQuestionsIdValuesIdEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint import \ - ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesIdEndpoint import ( + ConfigurationsTypesIdQuestionsIdValuesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint import ( + ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,7 +16,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "values", parent_endpoint=parent_endpoint) self.info = self._register_child_endpoint( - ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint(client, parent_endpoint=self) + ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ConfigurationsTypesIdQuestionsIdValuesIdEndpoint: @@ -26,6 +30,8 @@ def id(self, id: int) -> ConfigurationsTypesIdQuestionsIdValuesIdEndpoint: Returns: ConfigurationsTypesIdQuestionsIdValuesIdEndpoint: The initialized ConfigurationsTypesIdQuestionsIdValuesIdEndpoint object. """ - child = ConfigurationsTypesIdQuestionsIdValuesIdEndpoint(self.client, parent_endpoint=self) + child = ConfigurationsTypesIdQuestionsIdValuesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesIdEndpoint.py index 20f0ac654..df11d07c0 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint import \ - ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint import ( + ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,5 +13,7 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.info = self._register_child_endpoint( - ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint(client, parent_endpoint=self) + ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint( + client, parent_endpoint=self + ) ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint.py index 2246e30e1..d536c874e 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationTypeQuestionInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationTypeQuestionInfo: """ Performs a GET request against the /configurations/types/{id}/questions/{id}/values/{id}/info endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C ConfigurationTypeQuestionInfo: The parsed response data. """ return self._parse_one( - ConfigurationTypeQuestionInfo, super()._make_request("GET", data=data, params=params).json() + ConfigurationTypeQuestionInfo, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint.py index 9b7b32a5a..af4405bf7 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint(ConnectWiseEndpoin def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /configurations/types/{id}/questions/{id}/values/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /configurations/types/{id}/questions/{id}/values/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint.py index 3ee5769fd..b98b8fcbd 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsIdValuesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint import \ - ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint import ( + ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationTypeQuestionValueInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint(client, parent_endpoint=self) + ConfigurationsTypesIdQuestionsIdValuesInfoCountEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -52,5 +55,6 @@ def get( list[ConfigurationTypeQuestionValueInfo]: The parsed response data. """ return self._parse_many( - ConfigurationTypeQuestionValueInfo, super()._make_request("GET", data=data, params=params).json() + ConfigurationTypeQuestionValueInfo, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsInfoCountEndpoint.py index f9e9e24aa..8f53eb0d5 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ConfigurationsTypesIdQuestionsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /configurations/types/{id}/questions/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /configurations/types/{id}/questions/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsInfoEndpoint.py index 9b537485f..eda2f185e 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesIdQuestionsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsInfoCountEndpoint import \ - ConfigurationsTypesIdQuestionsInfoCountEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesIdQuestionsInfoCountEndpoint import ( + ConfigurationsTypesIdQuestionsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationTypeQuestionInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ConfigurationsTypesIdQuestionsInfoCountEndpoint(client, parent_endpoint=self) + ConfigurationsTypesIdQuestionsInfoCountEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationTypeQuestionInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationTypeQuestionInfo]: """ Performs a GET request against the /configurations/types/{id}/questions/info endpoint. @@ -50,5 +55,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ConfigurationTypeQuestionInfo]: The parsed response data. """ return self._parse_many( - ConfigurationTypeQuestionInfo, super()._make_request("GET", data=data, params=params).json() + ConfigurationTypeQuestionInfo, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesInfoCountEndpoint.py index 8ef10f845..c4ad617f1 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ConfigurationsTypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /configurations/types/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /configurations/types/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesInfoEndpoint.py index b06b86587..68757dd1f 100644 --- a/src/pyconnectwise/endpoints/manage/ConfigurationsTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ConfigurationsTypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ConfigurationsTypesInfoCountEndpoint import ConfigurationsTypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ConfigurationsTypesInfoCountEndpoint import ( + ConfigurationsTypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ConfigurationsTypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ConfigurationsTypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ConfigurationsTypesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationTypeInfo]: """ Performs a GET request against the /configurations/types/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ConfigurationTypeInfo]: The parsed response data. """ - return self._parse_many(ConfigurationTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ConfigurationTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseClassificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseClassificationsCountEndpoint.py index 87d930283..4e2e3277e 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseClassificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseClassificationsCountEndpoint.py @@ -10,7 +10,9 @@ class ExpenseClassificationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /expense/classifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /expense/classifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseClassificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseClassificationsEndpoint.py index c7c6e20ca..ab6a2b044 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseClassificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseClassificationsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseClassificationsCountEndpoint import ExpenseClassificationsCountEndpoint -from pyconnectwise.endpoints.manage.ExpenseClassificationsIdEndpoint import ExpenseClassificationsIdEndpoint +from pyconnectwise.endpoints.manage.ExpenseClassificationsCountEndpoint import ( + ExpenseClassificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseClassificationsIdEndpoint import ( + ExpenseClassificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Classification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ExpenseClassificationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "classifications", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ExpenseClassificationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ExpenseClassificationsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ExpenseClassificationsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Classification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Classification]: """ Performs a GET request against the /expense/classifications endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Classification]: The parsed response data. """ - return self._parse_many(Classification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Classification, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseClassificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseClassificationsIdEndpoint.py index d600b3eff..98f155fd1 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseClassificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseClassificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Classification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Classification: """ Performs a GET request against the /expense/classifications/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Classification: The parsed response data. """ - return self._parse_one(Classification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Classification, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseEndpoint.py index 418ae4686..fedc14f7a 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseEndpoint.py @@ -1,10 +1,14 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseClassificationsEndpoint import ExpenseClassificationsEndpoint +from pyconnectwise.endpoints.manage.ExpenseClassificationsEndpoint import ( + ExpenseClassificationsEndpoint, +) from pyconnectwise.endpoints.manage.ExpenseEntriesEndpoint import ExpenseEntriesEndpoint from pyconnectwise.endpoints.manage.ExpenseInfoEndpoint import ExpenseInfoEndpoint -from pyconnectwise.endpoints.manage.ExpensePaymenttypesEndpoint import ExpensePaymenttypesEndpoint +from pyconnectwise.endpoints.manage.ExpensePaymenttypesEndpoint import ( + ExpensePaymenttypesEndpoint, +) from pyconnectwise.endpoints.manage.ExpenseReportsEndpoint import ExpenseReportsEndpoint from pyconnectwise.endpoints.manage.ExpenseTypesEndpoint import ExpenseTypesEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel @@ -15,11 +19,21 @@ class ExpenseEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "expense", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ExpenseInfoEndpoint(client, parent_endpoint=self)) - self.entries = self._register_child_endpoint(ExpenseEntriesEndpoint(client, parent_endpoint=self)) + self.reports = self._register_child_endpoint( + ExpenseReportsEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ExpenseInfoEndpoint(client, parent_endpoint=self) + ) + self.entries = self._register_child_endpoint( + ExpenseEntriesEndpoint(client, parent_endpoint=self) + ) self.classifications = self._register_child_endpoint( ExpenseClassificationsEndpoint(client, parent_endpoint=self) ) - self.types = self._register_child_endpoint(ExpenseTypesEndpoint(client, parent_endpoint=self)) - self.payment_types = self._register_child_endpoint(ExpensePaymenttypesEndpoint(client, parent_endpoint=self)) - self.reports = self._register_child_endpoint(ExpenseReportsEndpoint(client, parent_endpoint=self)) + self.payment_types = self._register_child_endpoint( + ExpensePaymenttypesEndpoint(client, parent_endpoint=self) + ) + self.types = self._register_child_endpoint( + ExpenseTypesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseEntriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseEntriesCountEndpoint.py index 67799c834..7a31fbfaf 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseEntriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseEntriesCountEndpoint.py @@ -10,7 +10,9 @@ class ExpenseEntriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /expense/entries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /expense/entries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseEntriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseEntriesEndpoint.py index 0a2458901..84f054b9b 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseEntriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseEntriesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseEntriesCountEndpoint import ExpenseEntriesCountEndpoint -from pyconnectwise.endpoints.manage.ExpenseEntriesIdEndpoint import ExpenseEntriesIdEndpoint +from pyconnectwise.endpoints.manage.ExpenseEntriesCountEndpoint import ( + ExpenseEntriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseEntriesIdEndpoint import ( + ExpenseEntriesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseEntry from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ExpenseEntriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "entries", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ExpenseEntriesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ExpenseEntriesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ExpenseEntriesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ExpenseEntry]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ExpenseEntry]: """ Performs a GET request against the /expense/entries endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ExpenseEntry]: The parsed response data. """ - return self._parse_many(ExpenseEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ExpenseEntry, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseEntry: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseEntry: """ Performs a POST request against the /expense/entries endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ExpenseEntry: The parsed response data. """ - return self._parse_one(ExpenseEntry, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ExpenseEntry, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsCountEndpoint.py index 8b1e2b133..46048bcd0 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsCountEndpoint.py @@ -10,7 +10,9 @@ class ExpenseEntriesIdAuditsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /expense/entries/{id}/audits/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /expense/entries/{id}/audits/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsEndpoint.py index baf055d1f..ae9595386 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseEntriesIdAuditsCountEndpoint import ExpenseEntriesIdAuditsCountEndpoint -from pyconnectwise.endpoints.manage.ExpenseEntriesIdAuditsIdEndpoint import ExpenseEntriesIdAuditsIdEndpoint +from pyconnectwise.endpoints.manage.ExpenseEntriesIdAuditsCountEndpoint import ( + ExpenseEntriesIdAuditsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseEntriesIdAuditsIdEndpoint import ( + ExpenseEntriesIdAuditsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseEntryAudit from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ExpenseEntriesIdAuditsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "audits", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ExpenseEntriesIdAuditsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ExpenseEntriesIdAuditsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ExpenseEntriesIdAuditsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ExpenseEntryAudit]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ExpenseEntryAudit]: """ Performs a GET request against the /expense/entries/{id}/audits endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ExpenseEntryAudit]: The parsed response data. """ - return self._parse_many(ExpenseEntryAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ExpenseEntryAudit, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsIdEndpoint.py index 34ce9950c..beb061023 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdAuditsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseEntryAudit: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseEntryAudit: """ Performs a GET request against the /expense/entries/{id}/audits/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseEntryAudit: The parsed response data. """ - return self._parse_one(ExpenseEntryAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ExpenseEntryAudit, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdEndpoint.py index 4fccadce6..e42b59cb2 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseEntriesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseEntriesIdAuditsEndpoint import ExpenseEntriesIdAuditsEndpoint +from pyconnectwise.endpoints.manage.ExpenseEntriesIdAuditsEndpoint import ( + ExpenseEntriesIdAuditsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseEntry from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ExpenseEntriesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.audits = self._register_child_endpoint(ExpenseEntriesIdAuditsEndpoint(client, parent_endpoint=self)) + self.audits = self._register_child_endpoint( + ExpenseEntriesIdAuditsEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseEntry: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseEntry: """ Performs a GET request against the /expense/entries/{id} endpoint. @@ -46,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseEntry: The parsed response data. """ - return self._parse_one(ExpenseEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ExpenseEntry, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /expense/entries/{id} endpoint. @@ -58,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseEntry: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseEntry: """ Performs a PUT request against the /expense/entries/{id} endpoint. @@ -70,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseEntry: The parsed response data. """ - return self._parse_one(ExpenseEntry, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ExpenseEntry, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseEntry: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseEntry: """ Performs a PATCH request against the /expense/entries/{id} endpoint. @@ -82,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ExpenseEntry: The parsed response data. """ - return self._parse_one(ExpenseEntry, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ExpenseEntry, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseInfoEndpoint.py index f5157f7c6..08a05da46 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseInfoTaxtypesEndpoint import ExpenseInfoTaxtypesEndpoint +from pyconnectwise.endpoints.manage.ExpenseInfoTaxtypesEndpoint import ( + ExpenseInfoTaxtypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ExpenseInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.tax_types = self._register_child_endpoint(ExpenseInfoTaxtypesEndpoint(client, parent_endpoint=self)) + self.tax_types = self._register_child_endpoint( + ExpenseInfoTaxtypesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesCountEndpoint.py index 0743fedc5..bbb30c144 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesCountEndpoint.py @@ -10,7 +10,9 @@ class ExpenseInfoTaxtypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /expense/info/taxTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /expense/info/taxTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesEndpoint.py index 7023118cb..68baaf9ea 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseInfoTaxtypesCountEndpoint import ExpenseInfoTaxtypesCountEndpoint -from pyconnectwise.endpoints.manage.ExpenseInfoTaxtypesIdEndpoint import ExpenseInfoTaxtypesIdEndpoint +from pyconnectwise.endpoints.manage.ExpenseInfoTaxtypesCountEndpoint import ( + ExpenseInfoTaxtypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseInfoTaxtypesIdEndpoint import ( + ExpenseInfoTaxtypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseTaxTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ExpenseInfoTaxtypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "taxTypes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ExpenseInfoTaxtypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ExpenseInfoTaxtypesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ExpenseInfoTaxtypesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ExpenseTaxTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ExpenseTaxTypeInfo]: """ Performs a GET request against the /expense/info/taxTypes endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ExpenseTaxTypeInfo]: The parsed response data. """ - return self._parse_many(ExpenseTaxTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ExpenseTaxTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesIdEndpoint.py index f5eb0d610..d273afc44 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseInfoTaxTypesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseTaxTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseTaxTypeInfo: """ Performs a GET request against the /expense/info/taxTypes/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseTaxTypeInfo: The parsed response data. """ - return self._parse_one(ExpenseTaxTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ExpenseTaxTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesCountEndpoint.py index 656281f46..b9369ebde 100644 --- a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesCountEndpoint.py @@ -10,7 +10,9 @@ class ExpensePaymenttypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /expense/paymentTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /expense/paymentTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesEndpoint.py index f11cd472b..cb7c54ae2 100644 --- a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpensePaymenttypesCountEndpoint import ExpensePaymenttypesCountEndpoint -from pyconnectwise.endpoints.manage.ExpensePaymenttypesIdEndpoint import ExpensePaymenttypesIdEndpoint -from pyconnectwise.endpoints.manage.ExpensePaymenttypesInfoEndpoint import ExpensePaymenttypesInfoEndpoint +from pyconnectwise.endpoints.manage.ExpensePaymenttypesCountEndpoint import ( + ExpensePaymenttypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ExpensePaymenttypesIdEndpoint import ( + ExpensePaymenttypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ExpensePaymenttypesInfoEndpoint import ( + ExpensePaymenttypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PaymentType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ExpensePaymenttypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "paymentTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ExpensePaymenttypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ExpensePaymenttypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ExpensePaymenttypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ExpensePaymenttypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ExpensePaymenttypesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ExpensePaymenttypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[PaymentType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[PaymentType]: """ Performs a GET request against the /expense/paymentTypes endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PaymentType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PaymentType]: """ Performs a GET request against the /expense/paymentTypes endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PaymentType]: The parsed response data. """ - return self._parse_many(PaymentType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PaymentType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PaymentType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PaymentType: """ Performs a POST request against the /expense/paymentTypes endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PaymentType: The parsed response data. """ - return self._parse_one(PaymentType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PaymentType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesIdEndpoint.py index ca4b0e350..988de6605 100644 --- a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpensePaymenttypesIdInfoEndpoint import ExpensePaymenttypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.ExpensePaymenttypesIdInfoEndpoint import ( + ExpensePaymenttypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PaymentType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ExpensePaymenttypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ExpensePaymenttypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ExpensePaymenttypesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[PaymentType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[PaymentType]: """ Performs a GET request against the /expense/paymentTypes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PaymentType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PaymentType: """ Performs a GET request against the /expense/paymentTypes/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PaymentType: The parsed response data. """ - return self._parse_one(PaymentType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PaymentType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /expense/paymentTypes/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PaymentType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PaymentType: """ Performs a PUT request against the /expense/paymentTypes/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PaymentType: The parsed response data. """ - return self._parse_one(PaymentType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PaymentType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PaymentType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PaymentType: """ Performs a PATCH request against the /expense/paymentTypes/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PaymentType: The parsed response data. """ - return self._parse_one(PaymentType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PaymentType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesIdInfoEndpoint.py index ab335e345..5aba55be8 100644 --- a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PaymentTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PaymentTypeInfo: """ Performs a GET request against the /expense/paymentTypes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PaymentTypeInfo: The parsed response data. """ - return self._parse_one(PaymentTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PaymentTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesInfoEndpoint.py index 0db6f415f..5e60f69ee 100644 --- a/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpensePaymentTypesInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PaymentTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PaymentTypeInfo]: """ Performs a GET request against the /expense/paymentTypes/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PaymentTypeInfo]: The parsed response data. """ - return self._parse_many(PaymentTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PaymentTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsCountEndpoint.py index 63b7ae63c..fcc641e77 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsCountEndpoint.py @@ -10,7 +10,9 @@ class ExpenseReportsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /expense/reports/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /expense/reports/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsEndpoint.py index 85e98d950..1a03db035 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseReportsCountEndpoint import ExpenseReportsCountEndpoint -from pyconnectwise.endpoints.manage.ExpenseReportsIdEndpoint import ExpenseReportsIdEndpoint +from pyconnectwise.endpoints.manage.ExpenseReportsCountEndpoint import ( + ExpenseReportsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseReportsIdEndpoint import ( + ExpenseReportsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseReport from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ExpenseReportsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "reports", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ExpenseReportsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ExpenseReportsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ExpenseReportsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ExpenseReport]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ExpenseReport]: """ Performs a GET request against the /expense/reports endpoint. @@ -60,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ExpenseReport]: The parsed response data. """ - return self._parse_many(ExpenseReport, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ExpenseReport, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdApproveEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdApproveEndpoint.py index 3bff0fad9..ba2b70d58 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdApproveEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdApproveEndpoint.py @@ -10,7 +10,9 @@ class ExpenseReportsIdApproveEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "approve", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /expense/reports/{id}/approve endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsCountEndpoint.py index 433c2ebb6..6e4533cf5 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsCountEndpoint.py @@ -10,7 +10,9 @@ class ExpenseReportsIdAuditsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /expense/reports/{id}/audits/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /expense/reports/{id}/audits/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsEndpoint.py index bae55bdba..39790ff9d 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseReportsIdAuditsCountEndpoint import ExpenseReportsIdAuditsCountEndpoint -from pyconnectwise.endpoints.manage.ExpenseReportsIdAuditsIdEndpoint import ExpenseReportsIdAuditsIdEndpoint +from pyconnectwise.endpoints.manage.ExpenseReportsIdAuditsCountEndpoint import ( + ExpenseReportsIdAuditsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseReportsIdAuditsIdEndpoint import ( + ExpenseReportsIdAuditsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseReportAudit from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ExpenseReportsIdAuditsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "audits", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ExpenseReportsIdAuditsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ExpenseReportsIdAuditsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ExpenseReportsIdAuditsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ExpenseReportAudit]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ExpenseReportAudit]: """ Performs a GET request against the /expense/reports/{id}/audits endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ExpenseReportAudit]: The parsed response data. """ - return self._parse_many(ExpenseReportAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ExpenseReportAudit, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsIdEndpoint.py index 192428338..072e119aa 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdAuditsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseReportAudit: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseReportAudit: """ Performs a GET request against the /expense/reports/{id}/audits/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseReportAudit: The parsed response data. """ - return self._parse_one(ExpenseReportAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ExpenseReportAudit, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdEndpoint.py index bb2b2c7ec..e847c5af9 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdEndpoint.py @@ -1,11 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseReportsIdApproveEndpoint import ExpenseReportsIdApproveEndpoint -from pyconnectwise.endpoints.manage.ExpenseReportsIdAuditsEndpoint import ExpenseReportsIdAuditsEndpoint -from pyconnectwise.endpoints.manage.ExpenseReportsIdRejectEndpoint import ExpenseReportsIdRejectEndpoint -from pyconnectwise.endpoints.manage.ExpenseReportsIdReverseEndpoint import ExpenseReportsIdReverseEndpoint -from pyconnectwise.endpoints.manage.ExpenseReportsIdSubmitEndpoint import ExpenseReportsIdSubmitEndpoint +from pyconnectwise.endpoints.manage.ExpenseReportsIdApproveEndpoint import ( + ExpenseReportsIdApproveEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseReportsIdAuditsEndpoint import ( + ExpenseReportsIdAuditsEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseReportsIdRejectEndpoint import ( + ExpenseReportsIdRejectEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseReportsIdReverseEndpoint import ( + ExpenseReportsIdReverseEndpoint, +) +from pyconnectwise.endpoints.manage.ExpenseReportsIdSubmitEndpoint import ( + ExpenseReportsIdSubmitEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseReport from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,11 +25,21 @@ class ExpenseReportsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.approve = self._register_child_endpoint(ExpenseReportsIdApproveEndpoint(client, parent_endpoint=self)) - self.audits = self._register_child_endpoint(ExpenseReportsIdAuditsEndpoint(client, parent_endpoint=self)) - self.reject = self._register_child_endpoint(ExpenseReportsIdRejectEndpoint(client, parent_endpoint=self)) - self.submit = self._register_child_endpoint(ExpenseReportsIdSubmitEndpoint(client, parent_endpoint=self)) - self.reverse = self._register_child_endpoint(ExpenseReportsIdReverseEndpoint(client, parent_endpoint=self)) + self.reject = self._register_child_endpoint( + ExpenseReportsIdRejectEndpoint(client, parent_endpoint=self) + ) + self.submit = self._register_child_endpoint( + ExpenseReportsIdSubmitEndpoint(client, parent_endpoint=self) + ) + self.approve = self._register_child_endpoint( + ExpenseReportsIdApproveEndpoint(client, parent_endpoint=self) + ) + self.audits = self._register_child_endpoint( + ExpenseReportsIdAuditsEndpoint(client, parent_endpoint=self) + ) + self.reverse = self._register_child_endpoint( + ExpenseReportsIdReverseEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -44,7 +64,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseReport: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseReport: """ Performs a GET request against the /expense/reports/{id} endpoint. @@ -54,4 +76,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseReport: The parsed response data. """ - return self._parse_one(ExpenseReport, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ExpenseReport, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdRejectEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdRejectEndpoint.py index 88001ca88..e9fbb1418 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdRejectEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdRejectEndpoint.py @@ -10,7 +10,9 @@ class ExpenseReportsIdRejectEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "reject", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /expense/reports/{id}/reject endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdReverseEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdReverseEndpoint.py index 118b0b794..1de0be6cf 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdReverseEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdReverseEndpoint.py @@ -10,7 +10,9 @@ class ExpenseReportsIdReverseEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "reverse", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /expense/reports/{id}/reverse endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdSubmitEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdSubmitEndpoint.py index 37630d4b0..e374d1b17 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseReportsIdSubmitEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseReportsIdSubmitEndpoint.py @@ -10,7 +10,9 @@ class ExpenseReportsIdSubmitEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "submit", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /expense/reports/{id}/submit endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseTypesCountEndpoint.py index faa506f47..71c11e12f 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseTypesCountEndpoint.py @@ -10,7 +10,9 @@ class ExpenseTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /expense/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /expense/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseTypesEndpoint.py index 4e35a20b2..64e3441b0 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseTypesEndpoint.py @@ -1,9 +1,13 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseTypesCountEndpoint import ExpenseTypesCountEndpoint +from pyconnectwise.endpoints.manage.ExpenseTypesCountEndpoint import ( + ExpenseTypesCountEndpoint, +) from pyconnectwise.endpoints.manage.ExpenseTypesIdEndpoint import ExpenseTypesIdEndpoint -from pyconnectwise.endpoints.manage.ExpenseTypesInfoEndpoint import ExpenseTypesInfoEndpoint +from pyconnectwise.endpoints.manage.ExpenseTypesInfoEndpoint import ( + ExpenseTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +17,12 @@ class ExpenseTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ExpenseTypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ExpenseTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ExpenseTypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ExpenseTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ExpenseTypesIdEndpoint: """ @@ -29,7 +37,9 @@ def id(self, id: int) -> ExpenseTypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ExpenseType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ExpenseType]: """ Performs a GET request against the /expense/types endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +60,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ExpenseType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ExpenseType]: """ Performs a GET request against the /expense/types endpoint. @@ -60,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ExpenseType]: The parsed response data. """ - return self._parse_many(ExpenseType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ExpenseType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseType: """ Performs a POST request against the /expense/types endpoint. @@ -72,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ExpenseType: The parsed response data. """ - return self._parse_one(ExpenseType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ExpenseType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseTypesIdEndpoint.py index 83d8f57ea..3c1dedf75 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ExpenseTypesIdInfoEndpoint import ExpenseTypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.ExpenseTypesIdInfoEndpoint import ( + ExpenseTypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ExpenseTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ExpenseTypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ExpenseTypesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ExpenseType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ExpenseType]: """ Performs a GET request against the /expense/types/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseType: """ Performs a GET request against the /expense/types/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseType: The parsed response data. """ - return self._parse_one(ExpenseType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ExpenseType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /expense/types/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseType: """ Performs a PUT request against the /expense/types/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseType: The parsed response data. """ - return self._parse_one(ExpenseType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ExpenseType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseType: """ Performs a PATCH request against the /expense/types/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ExpenseType: The parsed response data. """ - return self._parse_one(ExpenseType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ExpenseType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseTypesIdInfoEndpoint.py index d3528b5ad..a3c8b2aa4 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseTypeInfo: """ Performs a GET request against the /expense/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseTypeInfo: The parsed response data. """ - return self._parse_one(ExpenseTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ExpenseTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ExpenseTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ExpenseTypesInfoEndpoint.py index 0af170401..42d0ac731 100644 --- a/src/pyconnectwise/endpoints/manage/ExpenseTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ExpenseTypesInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ExpenseTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ExpenseTypeInfo]: """ Performs a GET request against the /expense/types/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ExpenseTypeInfo]: The parsed response data. """ - return self._parse_many(ExpenseTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ExpenseTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesCountEndpoint.py index 695ff5eb1..d494a5a54 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingBatchesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accounting/batches/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accounting/batches/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesEndpoint.py index edbc776d2..9838583fa 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingBatchesCountEndpoint import FinanceAccountingBatchesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdEndpoint import FinanceAccountingBatchesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingBatchesCountEndpoint import ( + FinanceAccountingBatchesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdEndpoint import ( + FinanceAccountingBatchesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AccountingBatch, GLExport from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceAccountingBatchesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "batches", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceAccountingBatchesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceAccountingBatchesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceAccountingBatchesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AccountingBatch]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AccountingBatch]: """ Performs a GET request against the /finance/accounting/batches endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AccountingBatch]: The parsed response data. """ - return self._parse_many(AccountingBatch, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AccountingBatch, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLExport: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLExport: """ Performs a POST request against the /finance/accounting/batches endpoint. @@ -72,4 +85,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GLExport: The parsed response data. """ - return self._parse_one(GLExport, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GLExport, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEndpoint.py index e7943dd2d..29725e2ca 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdEntriesEndpoint import \ - FinanceAccountingBatchesIdEntriesEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdExportEndpoint import \ - FinanceAccountingBatchesIdExportEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdEntriesEndpoint import ( + FinanceAccountingBatchesIdEntriesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdExportEndpoint import ( + FinanceAccountingBatchesIdExportEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AccountingBatch from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,12 +16,12 @@ class FinanceAccountingBatchesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.entries = self._register_child_endpoint( - FinanceAccountingBatchesIdEntriesEndpoint(client, parent_endpoint=self) - ) self.export = self._register_child_endpoint( FinanceAccountingBatchesIdExportEndpoint(client, parent_endpoint=self) ) + self.entries = self._register_child_endpoint( + FinanceAccountingBatchesIdEntriesEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -44,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AccountingBatch: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AccountingBatch: """ Performs a GET request against the /finance/accounting/batches/{id} endpoint. @@ -54,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AccountingBatch: The parsed response data. """ - return self._parse_one(AccountingBatch, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AccountingBatch, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/accounting/batches/{id} endpoint. @@ -66,4 +75,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesCountEndpoint.py index 6569fd35c..04180e338 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingBatchesIdEntriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accounting/batches/{id}/entries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accounting/batches/{id}/entries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesEndpoint.py index 93f0e75e8..7ed4ff3b7 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdEntriesCountEndpoint import \ - FinanceAccountingBatchesIdEntriesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdEntriesIdEndpoint import \ - FinanceAccountingBatchesIdEntriesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdEntriesCountEndpoint import ( + FinanceAccountingBatchesIdEntriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingBatchesIdEntriesIdEndpoint import ( + FinanceAccountingBatchesIdEntriesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BatchEntry from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,11 +29,15 @@ def id(self, id: int) -> FinanceAccountingBatchesIdEntriesIdEndpoint: Returns: FinanceAccountingBatchesIdEntriesIdEndpoint: The initialized FinanceAccountingBatchesIdEntriesIdEndpoint object. """ - child = FinanceAccountingBatchesIdEntriesIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAccountingBatchesIdEntriesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BatchEntry]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BatchEntry]: """ Performs a GET request against the /finance/accounting/batches/{id}/entries endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BatchEntry]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BatchEntry]: """ Performs a GET request against the /finance/accounting/batches/{id}/entries endpoint. @@ -62,4 +70,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BatchEntry]: The parsed response data. """ - return self._parse_many(BatchEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BatchEntry, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesIdEndpoint.py index cd86b9d4c..002c9c686 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdEntriesIdEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingBatchesIdEntriesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BatchEntry]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BatchEntry]: """ Performs a GET request against the /finance/accounting/batches/{id}/entries/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BatchEntry: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BatchEntry: """ Performs a GET request against the /finance/accounting/batches/{id}/entries/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BatchEntry: The parsed response data. """ - return self._parse_one(BatchEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BatchEntry, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdExportEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdExportEndpoint.py index d3c030023..9545bdb90 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdExportEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingBatchesIdExportEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingBatchesIdExportEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "export", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLExport: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLExport: """ Performs a POST request against the /finance/accounting/batches/{id}/export endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GLExport: The parsed response data. """ - return self._parse_one(GLExport, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GLExport, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingEndpoint.py index 7ea7b11d3..8e7aaccfe 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingEndpoint.py @@ -1,14 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingBatchesEndpoint import FinanceAccountingBatchesEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingExportEndpoint import FinanceAccountingExportEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesEndpoint import \ - FinanceAccountingUnpostedexpensesEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesEndpoint import \ - FinanceAccountingUnpostedinvoicesEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementEndpoint import \ - FinanceAccountingUnpostedprocurementEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingBatchesEndpoint import ( + FinanceAccountingBatchesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingExportEndpoint import ( + FinanceAccountingExportEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesEndpoint import ( + FinanceAccountingUnpostedexpensesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesEndpoint import ( + FinanceAccountingUnpostedinvoicesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementEndpoint import ( + FinanceAccountingUnpostedprocurementEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -17,14 +24,18 @@ class FinanceAccountingEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "accounting", parent_endpoint=parent_endpoint) - self.batches = self._register_child_endpoint(FinanceAccountingBatchesEndpoint(client, parent_endpoint=self)) + self.unpostedexpenses = self._register_child_endpoint( + FinanceAccountingUnpostedexpensesEndpoint(client, parent_endpoint=self) + ) + self.export = self._register_child_endpoint( + FinanceAccountingExportEndpoint(client, parent_endpoint=self) + ) + self.batches = self._register_child_endpoint( + FinanceAccountingBatchesEndpoint(client, parent_endpoint=self) + ) self.unpostedinvoices = self._register_child_endpoint( FinanceAccountingUnpostedinvoicesEndpoint(client, parent_endpoint=self) ) self.unpostedprocurement = self._register_child_endpoint( FinanceAccountingUnpostedprocurementEndpoint(client, parent_endpoint=self) ) - self.export = self._register_child_endpoint(FinanceAccountingExportEndpoint(client, parent_endpoint=self)) - self.unpostedexpenses = self._register_child_endpoint( - FinanceAccountingUnpostedexpensesEndpoint(client, parent_endpoint=self) - ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingExportEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingExportEndpoint.py index 0aae1d772..696ee6ad0 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingExportEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingExportEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingExportEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "export", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLExport: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLExport: """ Performs a POST request against the /finance/accounting/export endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GLExport: The parsed response data. """ - return self._parse_one(GLExport, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GLExport, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupCountEndpoint.py index 234d5340f..38975ef7e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingpackagesetupCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accountingPackageSetup/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accountingPackageSetup/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupEndpoint.py index 47863f831..9cfbfbaa1 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingpackagesetupCountEndpoint import \ - FinanceAccountingpackagesetupCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingpackagesetupIdEndpoint import \ - FinanceAccountingpackagesetupIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingpackagesetupCountEndpoint import ( + FinanceAccountingpackagesetupCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingpackagesetupIdEndpoint import ( + FinanceAccountingpackagesetupIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AccountingPackageSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class FinanceAccountingpackagesetupEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "accountingPackageSetup", parent_endpoint=parent_endpoint) + super().__init__( + client, "accountingPackageSetup", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( FinanceAccountingpackagesetupCountEndpoint(client, parent_endpoint=self) @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAccountingpackagesetupIdEndpoint: Returns: FinanceAccountingpackagesetupIdEndpoint: The initialized FinanceAccountingpackagesetupIdEndpoint object. """ - child = FinanceAccountingpackagesetupIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAccountingpackagesetupIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AccountingPackageSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AccountingPackageSetup]: """ Performs a GET request against the /finance/accountingPackageSetup endpoint. @@ -64,4 +72,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AccountingPackageSetup]: The parsed response data. """ - return self._parse_many(AccountingPackageSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AccountingPackageSetup, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupIdEndpoint.py index f9ec4d663..948160177 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackageSetupIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AccountingPackageSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AccountingPackageSetup: """ Performs a GET request against the /finance/accountingPackageSetup/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AccountingPackageSetup: The parsed response data. """ - return self._parse_one(AccountingPackageSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AccountingPackageSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AccountingPackageSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AccountingPackageSetup: """ Performs a PUT request against the /finance/accountingPackageSetup/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AccountingPackageSetup: The parsed response data. """ - return self._parse_one(AccountingPackageSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AccountingPackageSetup, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AccountingPackageSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AccountingPackageSetup: """ Performs a PATCH request against the /finance/accountingPackageSetup/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AccountingPackageSetup: The parsed response data. """ - return self._parse_one(AccountingPackageSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AccountingPackageSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesCountEndpoint.py index 4b8357bba..0b6d607ca 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingpackagesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accountingPackages/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accountingPackages/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesEndpoint.py index 6f76c5f5d..7e2abe9bc 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingpackagesCountEndpoint import FinanceAccountingpackagesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingpackagesIdEndpoint import FinanceAccountingpackagesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingpackagesCountEndpoint import ( + FinanceAccountingpackagesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingpackagesIdEndpoint import ( + FinanceAccountingpackagesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AccountingPackage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceAccountingpackagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "accountingPackages", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceAccountingpackagesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceAccountingpackagesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceAccountingpackagesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AccountingPackage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AccountingPackage]: """ Performs a GET request against the /finance/accountingPackages endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AccountingPackage]: The parsed response data. """ - return self._parse_many(AccountingPackage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AccountingPackage, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesIdEndpoint.py index 259f1f3aa..068181ca8 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingPackagesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AccountingPackage: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AccountingPackage: """ Performs a GET request against the /finance/accountingPackages/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AccountingPackage: The parsed response data. """ - return self._parse_one(AccountingPackage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AccountingPackage, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesCountEndpoint.py index b34fa3411..deac16a84 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingUnpostedexpensesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accounting/unpostedexpenses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accounting/unpostedexpenses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesEndpoint.py index e06a821bc..952381c3d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesCountEndpoint import \ - FinanceAccountingUnpostedexpensesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesIdEndpoint import \ - FinanceAccountingUnpostedexpensesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesCountEndpoint import ( + FinanceAccountingUnpostedexpensesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesIdEndpoint import ( + FinanceAccountingUnpostedexpensesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnpostedExpense from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> FinanceAccountingUnpostedexpensesIdEndpoint: Returns: FinanceAccountingUnpostedexpensesIdEndpoint: The initialized FinanceAccountingUnpostedexpensesIdEndpoint object. """ - child = FinanceAccountingUnpostedexpensesIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAccountingUnpostedexpensesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UnpostedExpense]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UnpostedExpense]: """ Performs a GET request against the /finance/accounting/unpostedexpenses endpoint. @@ -64,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[UnpostedExpense]: The parsed response data. """ - return self._parse_many(UnpostedExpense, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + UnpostedExpense, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdEndpoint.py index 77039ce7d..50a38d968 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesIdTaxablelevelsEndpoint import \ - FinanceAccountingUnpostedexpensesIdTaxablelevelsEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesIdTaxablelevelsEndpoint import ( + FinanceAccountingUnpostedexpensesIdTaxablelevelsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnpostedExpense from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.taxable_levels = self._register_child_endpoint( - FinanceAccountingUnpostedexpensesIdTaxablelevelsEndpoint(client, parent_endpoint=self) + FinanceAccountingUnpostedexpensesIdTaxablelevelsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnpostedExpense: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnpostedExpense: """ Performs a GET request against the /finance/accounting/unpostedexpenses/{id} endpoint. @@ -49,4 +54,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UnpostedExpense: The parsed response data. """ - return self._parse_one(UnpostedExpense, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UnpostedExpense, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsCountEndpoint.py index bc8b44f3d..61c2700dd 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceAccountingUnpostedexpensesIdTaxablelevelsCountEndpoint(ConnectWiseEndpoint): +class FinanceAccountingUnpostedexpensesIdTaxablelevelsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accounting/unpostedexpenses/{id}/taxableLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accounting/unpostedexpenses/{id}/taxableLevels/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsEndpoint.py index d090549e4..ee92eb794 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesIdTaxablelevelsCountEndpoint import \ - FinanceAccountingUnpostedexpensesIdTaxablelevelsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpoint import \ - FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesIdTaxablelevelsCountEndpoint import ( + FinanceAccountingUnpostedexpensesIdTaxablelevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpoint import ( + FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnpostedExpenseTaxableLevel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "taxableLevels", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAccountingUnpostedexpensesIdTaxablelevelsCountEndpoint(client, parent_endpoint=self) + FinanceAccountingUnpostedexpensesIdTaxablelevelsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpo Returns: FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpoint: The initialized FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpoint object. """ - child = FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAccountingUnpostedexpensesIdTaxablelevelsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UnpostedExpenseTaxableLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UnpostedExpenseTaxableLevel]: """ Performs a GET request against the /finance/accounting/unpostedexpenses/{id}/taxableLevels endpoint. @@ -65,5 +73,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[UnpostedExpenseTaxableLevel]: The parsed response data. """ return self._parse_many( - UnpostedExpenseTaxableLevel, super()._make_request("GET", data=data, params=params).json() + UnpostedExpenseTaxableLevel, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsIdEndpoint.py index 00c17893e..7c3644c1c 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedexpensesIdTaxableLevelsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnpostedExpenseTaxableLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnpostedExpenseTaxableLevel: """ Performs a GET request against the /finance/accounting/unpostedexpenses/{id}/taxableLevels/{id} endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U UnpostedExpenseTaxableLevel: The parsed response data. """ return self._parse_one( - UnpostedExpenseTaxableLevel, super()._make_request("GET", data=data, params=params).json() + UnpostedExpenseTaxableLevel, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesCountEndpoint.py index 0cfdee4f7..05de148ec 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingUnpostedinvoicesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accounting/unpostedinvoices/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accounting/unpostedinvoices/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesEndpoint.py index dd4769f7c..045d9f05d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesCountEndpoint import \ - FinanceAccountingUnpostedinvoicesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesIdEndpoint import \ - FinanceAccountingUnpostedinvoicesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesCountEndpoint import ( + FinanceAccountingUnpostedinvoicesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesIdEndpoint import ( + FinanceAccountingUnpostedinvoicesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnpostedInvoice from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> FinanceAccountingUnpostedinvoicesIdEndpoint: Returns: FinanceAccountingUnpostedinvoicesIdEndpoint: The initialized FinanceAccountingUnpostedinvoicesIdEndpoint object. """ - child = FinanceAccountingUnpostedinvoicesIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAccountingUnpostedinvoicesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UnpostedInvoice]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UnpostedInvoice]: """ Performs a GET request against the /finance/accounting/unpostedinvoices endpoint. @@ -64,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[UnpostedInvoice]: The parsed response data. """ - return self._parse_many(UnpostedInvoice, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + UnpostedInvoice, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdEndpoint.py index 1be1c5fda..e6cee0136 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesIdTaxablelevelsEndpoint import \ - FinanceAccountingUnpostedinvoicesIdTaxablelevelsEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesIdTaxablelevelsEndpoint import ( + FinanceAccountingUnpostedinvoicesIdTaxablelevelsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnpostedInvoice from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.taxable_levels = self._register_child_endpoint( - FinanceAccountingUnpostedinvoicesIdTaxablelevelsEndpoint(client, parent_endpoint=self) + FinanceAccountingUnpostedinvoicesIdTaxablelevelsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnpostedInvoice: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnpostedInvoice: """ Performs a GET request against the /finance/accounting/unpostedinvoices/{id} endpoint. @@ -49,4 +54,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UnpostedInvoice: The parsed response data. """ - return self._parse_one(UnpostedInvoice, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UnpostedInvoice, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsCountEndpoint.py index b778d1a80..0f86941ff 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceAccountingUnpostedinvoicesIdTaxablelevelsCountEndpoint(ConnectWiseEndpoint): +class FinanceAccountingUnpostedinvoicesIdTaxablelevelsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accounting/unpostedinvoices/{id}/taxableLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accounting/unpostedinvoices/{id}/taxableLevels/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsEndpoint.py index f4ebbed2d..59c770271 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesIdTaxablelevelsCountEndpoint import \ - FinanceAccountingUnpostedinvoicesIdTaxablelevelsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpoint import \ - FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesIdTaxablelevelsCountEndpoint import ( + FinanceAccountingUnpostedinvoicesIdTaxablelevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpoint import ( + FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnpostedInvoiceTaxableLevel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "taxableLevels", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAccountingUnpostedinvoicesIdTaxablelevelsCountEndpoint(client, parent_endpoint=self) + FinanceAccountingUnpostedinvoicesIdTaxablelevelsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpo Returns: FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpoint: The initialized FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpoint object. """ - child = FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAccountingUnpostedinvoicesIdTaxablelevelsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UnpostedInvoiceTaxableLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UnpostedInvoiceTaxableLevel]: """ Performs a GET request against the /finance/accounting/unpostedinvoices/{id}/taxableLevels endpoint. @@ -65,5 +73,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[UnpostedInvoiceTaxableLevel]: The parsed response data. """ return self._parse_many( - UnpostedInvoiceTaxableLevel, super()._make_request("GET", data=data, params=params).json() + UnpostedInvoiceTaxableLevel, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsIdEndpoint.py index 9e2415645..0b7e13bc4 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedinvoicesIdTaxableLevelsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnpostedInvoiceTaxableLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnpostedInvoiceTaxableLevel: """ Performs a GET request against the /finance/accounting/unpostedinvoices/{id}/taxableLevels/{id} endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U UnpostedInvoiceTaxableLevel: The parsed response data. """ return self._parse_one( - UnpostedInvoiceTaxableLevel, super()._make_request("GET", data=data, params=params).json() + UnpostedInvoiceTaxableLevel, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementCountEndpoint.py index e3bf96be7..99e3f517a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAccountingUnpostedprocurementCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accounting/unpostedprocurement/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accounting/unpostedprocurement/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementEndpoint.py index 43ba50b0f..70a69e0aa 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementCountEndpoint import \ - FinanceAccountingUnpostedprocurementCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementIdEndpoint import \ - FinanceAccountingUnpostedprocurementIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementCountEndpoint import ( + FinanceAccountingUnpostedprocurementCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementIdEndpoint import ( + FinanceAccountingUnpostedprocurementIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnpostedProcurement from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "unpostedprocurement", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAccountingUnpostedprocurementCountEndpoint(client, parent_endpoint=self) + FinanceAccountingUnpostedprocurementCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceAccountingUnpostedprocurementIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAccountingUnpostedprocurementIdEndpoint: Returns: FinanceAccountingUnpostedprocurementIdEndpoint: The initialized FinanceAccountingUnpostedprocurementIdEndpoint object. """ - child = FinanceAccountingUnpostedprocurementIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAccountingUnpostedprocurementIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UnpostedProcurement]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UnpostedProcurement]: """ Performs a GET request against the /finance/accounting/unpostedprocurement endpoint. @@ -64,4 +72,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[UnpostedProcurement]: The parsed response data. """ - return self._parse_many(UnpostedProcurement, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + UnpostedProcurement, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdEndpoint.py index df54ed933..1c0fe38ff 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementIdTaxablelevelsEndpoint import \ - FinanceAccountingUnpostedprocurementIdTaxablelevelsEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementIdTaxablelevelsEndpoint import ( + FinanceAccountingUnpostedprocurementIdTaxablelevelsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnpostedProcurement from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.taxable_levels = self._register_child_endpoint( - FinanceAccountingUnpostedprocurementIdTaxablelevelsEndpoint(client, parent_endpoint=self) + FinanceAccountingUnpostedprocurementIdTaxablelevelsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnpostedProcurement: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnpostedProcurement: """ Performs a GET request against the /finance/accounting/unpostedprocurement/{id} endpoint. @@ -49,4 +54,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UnpostedProcurement: The parsed response data. """ - return self._parse_one(UnpostedProcurement, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UnpostedProcurement, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsCountEndpoint.py index 5ade43f39..54ca0bcd1 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceAccountingUnpostedprocurementIdTaxablelevelsCountEndpoint(ConnectWiseEndpoint): +class FinanceAccountingUnpostedprocurementIdTaxablelevelsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/accounting/unpostedprocurement/{id}/taxableLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/accounting/unpostedprocurement/{id}/taxableLevels/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsEndpoint.py index 9c50410e9..38b988257 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementIdTaxablelevelsCountEndpoint import \ - FinanceAccountingUnpostedprocurementIdTaxablelevelsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint import \ - FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementIdTaxablelevelsCountEndpoint import ( + FinanceAccountingUnpostedprocurementIdTaxablelevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint import ( + FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnpostedProcurementTaxableLevel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,10 +17,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "taxableLevels", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAccountingUnpostedprocurementIdTaxablelevelsCountEndpoint(client, parent_endpoint=self) + FinanceAccountingUnpostedprocurementIdTaxablelevelsCountEndpoint( + client, parent_endpoint=self + ) ) - def id(self, id: int) -> FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint: + def id( + self, id: int + ) -> FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint: """ Sets the ID for this endpoint and returns an initialized FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint object to move down the chain. @@ -27,7 +33,9 @@ def id(self, id: int) -> FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEn Returns: FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint: The initialized FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint object. """ - child = FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,5 +75,6 @@ def get( list[UnpostedProcurementTaxableLevel]: The parsed response data. """ return self._parse_many( - UnpostedProcurementTaxableLevel, super()._make_request("GET", data=data, params=params).json() + UnpostedProcurementTaxableLevel, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsIdEndpoint.py index 374abfe5f..02b8d4087 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAccountingUnpostedprocurementIdTaxableLevelsIdEndpoint.py @@ -6,7 +6,9 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint(ConnectWiseEndpoint): +class FinanceAccountingUnpostedprocurementIdTaxablelevelsIdEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnpostedProcurementTaxableLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnpostedProcurementTaxableLevel: """ Performs a GET request against the /finance/accounting/unpostedprocurement/{id}/taxableLevels/{id} endpoint. @@ -44,5 +48,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U UnpostedProcurementTaxableLevel: The parsed response data. """ return self._parse_one( - UnpostedProcurementTaxableLevel, super()._make_request("GET", data=data, params=params).json() + UnpostedProcurementTaxableLevel, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsCountEndpoint.py index 5faeac249..17753c039 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementtypesIdBoarddefaultsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreementTypes/{id}/boardDefaults/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreementTypes/{id}/boardDefaults/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsEndpoint.py index 150c2c940..482b75839 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdBoarddefaultsCountEndpoint import \ - FinanceAgreementtypesIdBoarddefaultsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdBoarddefaultsIdEndpoint import \ - FinanceAgreementtypesIdBoarddefaultsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdBoarddefaultsCountEndpoint import ( + FinanceAgreementtypesIdBoarddefaultsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdBoarddefaultsIdEndpoint import ( + FinanceAgreementtypesIdBoarddefaultsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementTypeBoardDefault from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "boardDefaults", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAgreementtypesIdBoarddefaultsCountEndpoint(client, parent_endpoint=self) + FinanceAgreementtypesIdBoarddefaultsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceAgreementtypesIdBoarddefaultsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAgreementtypesIdBoarddefaultsIdEndpoint: Returns: FinanceAgreementtypesIdBoarddefaultsIdEndpoint: The initialized FinanceAgreementtypesIdBoarddefaultsIdEndpoint object. """ - child = FinanceAgreementtypesIdBoarddefaultsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementtypesIdBoarddefaultsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementTypeBoardDefault]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementTypeBoardDefault]: """ Performs a GET request against the /finance/agreementTypes/{id}/boardDefaults endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[AgreementTypeBoardDefault]: The parsed response data. """ return self._parse_many( - AgreementTypeBoardDefault, super()._make_request("GET", data=data, params=params).json() + AgreementTypeBoardDefault, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeBoardDefault: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeBoardDefault: """ Performs a POST request against the /finance/agreementTypes/{id}/boardDefaults endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeBoardDefault: The parsed response data. """ return self._parse_one( - AgreementTypeBoardDefault, super()._make_request("POST", data=data, params=params).json() + AgreementTypeBoardDefault, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsIdEndpoint.py index 912067ad2..c18704a64 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdBoardDefaultsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeBoardDefault: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeBoardDefault: """ Performs a GET request against the /finance/agreementTypes/{id}/boardDefaults/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementTypeBoardDefault: The parsed response data. """ - return self._parse_one(AgreementTypeBoardDefault, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementTypeBoardDefault, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreementTypes/{id}/boardDefaults/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeBoardDefault: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeBoardDefault: """ Performs a PUT request against the /finance/agreementTypes/{id}/boardDefaults/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementTypeBoardDefault: The parsed response data. """ - return self._parse_one(AgreementTypeBoardDefault, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AgreementTypeBoardDefault, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeBoardDefault: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeBoardDefault: """ Performs a PATCH request against the /finance/agreementTypes/{id}/boardDefaults/{id} endpoint. @@ -80,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeBoardDefault: The parsed response data. """ return self._parse_one( - AgreementTypeBoardDefault, super()._make_request("PATCH", data=data, params=params).json() + AgreementTypeBoardDefault, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsCountEndpoint.py index dfbffea8f..d17f4f1a8 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementtypesIdWorkroleexclusionsCountEndpoint(ConnectWiseEndpoint def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreementTypes/{id}/workRoleExclusions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreementTypes/{id}/workRoleExclusions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsEndpoint.py index 0ed44b149..42838e9d0 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkroleexclusionsCountEndpoint import \ - FinanceAgreementtypesIdWorkroleexclusionsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint import \ - FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkroleexclusionsCountEndpoint import ( + FinanceAgreementtypesIdWorkroleexclusionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint import ( + FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementTypeWorkRoleExclusion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "workRoleExclusions", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAgreementtypesIdWorkroleexclusionsCountEndpoint(client, parent_endpoint=self) + FinanceAgreementtypesIdWorkroleexclusionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint: Returns: FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint: The initialized FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint object. """ - child = FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementtypesIdWorkroleexclusionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementTypeWorkRoleExclusion]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementTypeWorkRoleExclusion]: """ Performs a GET request against the /finance/agreementTypes/{id}/workRoleExclusions endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[AgreementTypeWorkRoleExclusion]: The parsed response data. """ return self._parse_many( - AgreementTypeWorkRoleExclusion, super()._make_request("GET", data=data, params=params).json() + AgreementTypeWorkRoleExclusion, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkRoleExclusion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkRoleExclusion: """ Performs a POST request against the /finance/agreementTypes/{id}/workRoleExclusions endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkRoleExclusion: The parsed response data. """ return self._parse_one( - AgreementTypeWorkRoleExclusion, super()._make_request("POST", data=data, params=params).json() + AgreementTypeWorkRoleExclusion, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsIdEndpoint.py index e8bb76bb8..37c32e2c1 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkRoleExclusionsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkRoleExclusion: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkRoleExclusion: """ Performs a GET request against the /finance/agreementTypes/{id}/workRoleExclusions/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A AgreementTypeWorkRoleExclusion: The parsed response data. """ return self._parse_one( - AgreementTypeWorkRoleExclusion, super()._make_request("GET", data=data, params=params).json() + AgreementTypeWorkRoleExclusion, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreementTypes/{id}/workRoleExclusions/{id} endpoint. @@ -57,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsCountEndpoint.py index db01456dd..6fc1e1df8 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementtypesIdWorktypeexclusionsCountEndpoint(ConnectWiseEndpoint def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreementTypes/{id}/workTypeExclusions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreementTypes/{id}/workTypeExclusions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsEndpoint.py index ac67fd864..5e011bdd4 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypeexclusionsCountEndpoint import \ - FinanceAgreementtypesIdWorktypeexclusionsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint import \ - FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypeexclusionsCountEndpoint import ( + FinanceAgreementtypesIdWorktypeexclusionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint import ( + FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementTypeWorkTypeExclusion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "workTypeExclusions", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAgreementtypesIdWorktypeexclusionsCountEndpoint(client, parent_endpoint=self) + FinanceAgreementtypesIdWorktypeexclusionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint: Returns: FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint: The initialized FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint object. """ - child = FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementtypesIdWorktypeexclusionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementTypeWorkTypeExclusion]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementTypeWorkTypeExclusion]: """ Performs a GET request against the /finance/agreementTypes/{id}/workTypeExclusions endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[AgreementTypeWorkTypeExclusion]: The parsed response data. """ return self._parse_many( - AgreementTypeWorkTypeExclusion, super()._make_request("GET", data=data, params=params).json() + AgreementTypeWorkTypeExclusion, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkTypeExclusion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkTypeExclusion: """ Performs a POST request against the /finance/agreementTypes/{id}/workTypeExclusions endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkTypeExclusion: The parsed response data. """ return self._parse_one( - AgreementTypeWorkTypeExclusion, super()._make_request("POST", data=data, params=params).json() + AgreementTypeWorkTypeExclusion, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsIdEndpoint.py index 0ad817f3b..c83b909db 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkTypeExclusionsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkTypeExclusion: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkTypeExclusion: """ Performs a GET request against the /finance/agreementTypes/{id}/workTypeExclusions/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A AgreementTypeWorkTypeExclusion: The parsed response data. """ return self._parse_one( - AgreementTypeWorkTypeExclusion, super()._make_request("GET", data=data, params=params).json() + AgreementTypeWorkTypeExclusion, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreementTypes/{id}/workTypeExclusions/{id} endpoint. @@ -57,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesCountEndpoint.py index ad10f0d35..71680bf67 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementtypesIdWorkrolesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreementTypes/{id}/workroles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreementTypes/{id}/workroles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesEndpoint.py index 04f64c821..da79ca7f8 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesCountEndpoint import \ - FinanceAgreementtypesIdWorkrolesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesIdEndpoint import \ - FinanceAgreementtypesIdWorkrolesIdEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesInfoEndpoint import \ - FinanceAgreementtypesIdWorkrolesInfoEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesCountEndpoint import ( + FinanceAgreementtypesIdWorkrolesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesIdEndpoint import ( + FinanceAgreementtypesIdWorkrolesIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesInfoEndpoint import ( + FinanceAgreementtypesIdWorkrolesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementTypeWorkRole from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,12 +19,12 @@ class FinanceAgreementtypesIdWorkrolesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "workroles", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - FinanceAgreementtypesIdWorkrolesInfoEndpoint(client, parent_endpoint=self) - ) self.count = self._register_child_endpoint( FinanceAgreementtypesIdWorkrolesCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + FinanceAgreementtypesIdWorkrolesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceAgreementtypesIdWorkrolesIdEndpoint: """ @@ -32,7 +35,9 @@ def id(self, id: int) -> FinanceAgreementtypesIdWorkrolesIdEndpoint: Returns: FinanceAgreementtypesIdWorkrolesIdEndpoint: The initialized FinanceAgreementtypesIdWorkrolesIdEndpoint object. """ - child = FinanceAgreementtypesIdWorkrolesIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementtypesIdWorkrolesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -59,7 +64,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementTypeWorkRole]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementTypeWorkRole]: """ Performs a GET request against the /finance/agreementTypes/{id}/workroles endpoint. @@ -69,9 +76,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AgreementTypeWorkRole]: The parsed response data. """ - return self._parse_many(AgreementTypeWorkRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AgreementTypeWorkRole, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkRole: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkRole: """ Performs a POST request against the /finance/agreementTypes/{id}/workroles endpoint. @@ -81,4 +93,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementTypeWorkRole: The parsed response data. """ - return self._parse_one(AgreementTypeWorkRole, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AgreementTypeWorkRole, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesIdEndpoint.py index 810faa7bb..e261792a3 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkRole: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkRole: """ Performs a GET request against the /finance/agreementTypes/{id}/workroles/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementTypeWorkRole: The parsed response data. """ - return self._parse_one(AgreementTypeWorkRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementTypeWorkRole, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreementTypes/{id}/workroles/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkRole: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkRole: """ Performs a PUT request against the /finance/agreementTypes/{id}/workroles/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementTypeWorkRole: The parsed response data. """ - return self._parse_one(AgreementTypeWorkRole, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AgreementTypeWorkRole, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkRole: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkRole: """ Performs a PATCH request against the /finance/agreementTypes/{id}/workroles/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementTypeWorkRole: The parsed response data. """ - return self._parse_one(AgreementTypeWorkRole, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AgreementTypeWorkRole, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoCountEndpoint.py index ff0cc3251..bf2abdf07 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementtypesIdWorkrolesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreementTypes/{id}/workroles/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreementTypes/{id}/workroles/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoEndpoint.py index 101a5e60f..c48bcf3c6 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesInfoCountEndpoint import \ - FinanceAgreementtypesIdWorkrolesInfoCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesInfoIdEndpoint import \ - FinanceAgreementtypesIdWorkrolesInfoIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesInfoCountEndpoint import ( + FinanceAgreementtypesIdWorkrolesInfoCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesInfoIdEndpoint import ( + FinanceAgreementtypesIdWorkrolesInfoIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementTypeWorkRoleInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAgreementtypesIdWorkrolesInfoCountEndpoint(client, parent_endpoint=self) + FinanceAgreementtypesIdWorkrolesInfoCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceAgreementtypesIdWorkrolesInfoIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAgreementtypesIdWorkrolesInfoIdEndpoint: Returns: FinanceAgreementtypesIdWorkrolesInfoIdEndpoint: The initialized FinanceAgreementtypesIdWorkrolesInfoIdEndpoint object. """ - child = FinanceAgreementtypesIdWorkrolesInfoIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementtypesIdWorkrolesInfoIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementTypeWorkRoleInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementTypeWorkRoleInfo]: """ Performs a GET request against the /finance/agreementTypes/{id}/workroles/info endpoint. @@ -65,5 +73,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[AgreementTypeWorkRoleInfo]: The parsed response data. """ return self._parse_many( - AgreementTypeWorkRoleInfo, super()._make_request("GET", data=data, params=params).json() + AgreementTypeWorkRoleInfo, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoIdEndpoint.py index fc4f4c425..14fd53d5b 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorkrolesInfoIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkRoleInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkRoleInfo: """ Performs a GET request against the /finance/agreementTypes/{id}/workroles/info/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementTypeWorkRoleInfo: The parsed response data. """ - return self._parse_one(AgreementTypeWorkRoleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementTypeWorkRoleInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesCountEndpoint.py index 9ecc34e57..f21bf7ec3 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementtypesIdWorktypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreementTypes/{id}/worktypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreementTypes/{id}/worktypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesEndpoint.py index 7dbe95437..8f7635bf8 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypesCountEndpoint import \ - FinanceAgreementtypesIdWorktypesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypesIdEndpoint import \ - FinanceAgreementtypesIdWorktypesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypesCountEndpoint import ( + FinanceAgreementtypesIdWorktypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypesIdEndpoint import ( + FinanceAgreementtypesIdWorktypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementTypeWorkType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> FinanceAgreementtypesIdWorktypesIdEndpoint: Returns: FinanceAgreementtypesIdWorktypesIdEndpoint: The initialized FinanceAgreementtypesIdWorktypesIdEndpoint object. """ - child = FinanceAgreementtypesIdWorktypesIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementtypesIdWorktypesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementTypeWorkType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementTypeWorkType]: """ Performs a GET request against the /finance/agreementTypes/{id}/worktypes endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AgreementTypeWorkType]: The parsed response data. """ - return self._parse_many(AgreementTypeWorkType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AgreementTypeWorkType, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkType: """ Performs a POST request against the /finance/agreementTypes/{id}/worktypes endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementTypeWorkType: The parsed response data. """ - return self._parse_one(AgreementTypeWorkType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AgreementTypeWorkType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesIdEndpoint.py index d873f74a8..72572d009 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementTypesIdWorktypesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkType: """ Performs a GET request against the /finance/agreementTypes/{id}/worktypes/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementTypeWorkType: The parsed response data. """ - return self._parse_one(AgreementTypeWorkType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementTypeWorkType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreementTypes/{id}/worktypes/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkType: """ Performs a PUT request against the /finance/agreementTypes/{id}/worktypes/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementTypeWorkType: The parsed response data. """ - return self._parse_one(AgreementTypeWorkType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AgreementTypeWorkType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeWorkType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeWorkType: """ Performs a PATCH request against the /finance/agreementTypes/{id}/worktypes/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementTypeWorkType: The parsed response data. """ - return self._parse_one(AgreementTypeWorkType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AgreementTypeWorkType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementrecapEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementrecapEndpoint.py index de927e547..586f8586d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementrecapEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementrecapEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementrecapIdEndpoint import FinanceAgreementrecapIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementrecapIdEndpoint import ( + FinanceAgreementrecapIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementrecapIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementrecapIdEndpoint.py index 065854bbe..8cb179885 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementrecapIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementrecapIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementRecap: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementRecap: """ Performs a GET request against the /finance/agreementrecap/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementRecap: The parsed response data. """ - return self._parse_one(AgreementRecap, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementRecap, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsCountEndpoint.py index 78187f22a..6e8b3a4e2 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsEndpoint.py index fc5950c9d..2c854268d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsCountEndpoint import FinanceAgreementsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdEndpoint import FinanceAgreementsIdEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsTypesEndpoint import FinanceAgreementsTypesEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsCountEndpoint import ( + FinanceAgreementsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdEndpoint import ( + FinanceAgreementsIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsTypesEndpoint import ( + FinanceAgreementsTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Agreement from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class FinanceAgreementsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "agreements", parent_endpoint=parent_endpoint) - self.types = self._register_child_endpoint(FinanceAgreementsTypesEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(FinanceAgreementsCountEndpoint(client, parent_endpoint=self)) + self.types = self._register_child_endpoint( + FinanceAgreementsTypesEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + FinanceAgreementsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceAgreementsIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> FinanceAgreementsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Agreement]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Agreement]: """ Performs a GET request against the /finance/agreements endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Agreement]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Agreement]: """ Performs a GET request against the /finance/agreements endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Agreement]: The parsed response data. """ - return self._parse_many(Agreement, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Agreement, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a POST request against the /finance/agreements endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsCountEndpoint.py index c9c217261..5e0d949e9 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdAdditionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/{id}/additions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/{id}/additions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsEndpoint.py index c78082ff1..e31f11d0e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdditionsCountEndpoint import \ - FinanceAgreementsIdAdditionsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdditionsIdEndpoint import FinanceAgreementsIdAdditionsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdditionsCountEndpoint import ( + FinanceAgreementsIdAdditionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdditionsIdEndpoint import ( + FinanceAgreementsIdAdditionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Addition from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,11 +29,15 @@ def id(self, id: int) -> FinanceAgreementsIdAdditionsIdEndpoint: Returns: FinanceAgreementsIdAdditionsIdEndpoint: The initialized FinanceAgreementsIdAdditionsIdEndpoint object. """ - child = FinanceAgreementsIdAdditionsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdAdditionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Addition]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Addition]: """ Performs a GET request against the /finance/agreements/{id}/additions endpoint and returns an initialized PaginatedResponse object. @@ -51,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Addition]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Addition]: """ Performs a GET request against the /finance/agreements/{id}/additions endpoint. @@ -61,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Addition]: The parsed response data. """ - return self._parse_many(Addition, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Addition, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Addition: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Addition: """ Performs a POST request against the /finance/agreements/{id}/additions endpoint. @@ -73,4 +86,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Addition: The parsed response data. """ - return self._parse_one(Addition, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Addition, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsIdEndpoint.py index 31d1adc05..6ef75c5ce 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdditionsIdEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdAdditionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Addition]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Addition]: """ Performs a GET request against the /finance/agreements/{id}/additions/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Addition: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Addition: """ Performs a GET request against the /finance/agreements/{id}/additions/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: Addition: The parsed response data. """ - return self._parse_one(Addition, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Addition, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id}/additions/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Addition: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Addition: """ Performs a PUT request against the /finance/agreements/{id}/additions/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: Addition: The parsed response data. """ - return self._parse_one(Addition, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Addition, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Addition: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Addition: """ Performs a PATCH request against the /finance/agreements/{id}/additions/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Addition: The parsed response data. """ - return self._parse_one(Addition, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Addition, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsCountEndpoint.py index a930c09d7..35292f32a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdAdjustmentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/{id}/adjustments/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/{id}/adjustments/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsEndpoint.py index 968b84538..04450ba9a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdjustmentsCountEndpoint import \ - FinanceAgreementsIdAdjustmentsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdjustmentsIdEndpoint import \ - FinanceAgreementsIdAdjustmentsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdjustmentsCountEndpoint import ( + FinanceAgreementsIdAdjustmentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdjustmentsIdEndpoint import ( + FinanceAgreementsIdAdjustmentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Agreement from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,11 +29,15 @@ def id(self, id: int) -> FinanceAgreementsIdAdjustmentsIdEndpoint: Returns: FinanceAgreementsIdAdjustmentsIdEndpoint: The initialized FinanceAgreementsIdAdjustmentsIdEndpoint object. """ - child = FinanceAgreementsIdAdjustmentsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdAdjustmentsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Agreement]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Agreement]: """ Performs a GET request against the /finance/agreements/{id}/adjustments endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Agreement]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Agreement]: """ Performs a GET request against the /finance/agreements/{id}/adjustments endpoint. @@ -62,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Agreement]: The parsed response data. """ - return self._parse_many(Agreement, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Agreement, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a POST request against the /finance/agreements/{id}/adjustments endpoint. @@ -74,4 +86,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsIdEndpoint.py index 1fb6aabbb..d7d62e6f5 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdAdjustmentsIdEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdAdjustmentsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Agreement]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Agreement]: """ Performs a GET request against the /finance/agreements/{id}/adjustments/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a GET request against the /finance/agreements/{id}/adjustments/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id}/adjustments/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a PUT request against the /finance/agreements/{id}/adjustments/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a PATCH request against the /finance/agreements/{id}/adjustments/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdApplicationparametersEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdApplicationparametersEndpoint.py index d97cb6061..803a68c0c 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdApplicationparametersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdApplicationparametersEndpoint.py @@ -1,15 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdApplicationparametersIdEndpoint import \ - FinanceAgreementsIdApplicationparametersIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdApplicationparametersIdEndpoint import ( + FinanceAgreementsIdApplicationparametersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class FinanceAgreementsIdApplicationparametersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "applicationParameters", parent_endpoint=parent_endpoint) + super().__init__( + client, "applicationParameters", parent_endpoint=parent_endpoint + ) def id(self, id: int) -> FinanceAgreementsIdApplicationparametersIdEndpoint: """ @@ -20,6 +23,8 @@ def id(self, id: int) -> FinanceAgreementsIdApplicationparametersIdEndpoint: Returns: FinanceAgreementsIdApplicationparametersIdEndpoint: The initialized FinanceAgreementsIdApplicationparametersIdEndpoint object. """ - child = FinanceAgreementsIdApplicationparametersIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdApplicationparametersIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdApplicationparametersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdApplicationparametersIdEndpoint.py index b7284a871..1a56ed12a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdApplicationparametersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdApplicationparametersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementApplicationParameters: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementApplicationParameters: """ Performs a GET request against the /finance/agreements/{id}/applicationParameters/{id} endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A AgreementApplicationParameters: The parsed response data. """ return self._parse_one( - AgreementApplicationParameters, super()._make_request("GET", data=data, params=params).json() + AgreementApplicationParameters, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsCountEndpoint.py index 7c6bacbd0..a7dc919d3 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdBoarddefaultsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/{id}/boardDefaults/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/{id}/boardDefaults/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsEndpoint.py index 55d7f82cd..e17bbe14e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdBoarddefaultsCountEndpoint import \ - FinanceAgreementsIdBoarddefaultsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdBoarddefaultsIdEndpoint import \ - FinanceAgreementsIdBoarddefaultsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdBoarddefaultsCountEndpoint import ( + FinanceAgreementsIdBoarddefaultsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdBoarddefaultsIdEndpoint import ( + FinanceAgreementsIdBoarddefaultsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardDefault from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> FinanceAgreementsIdBoarddefaultsIdEndpoint: Returns: FinanceAgreementsIdBoarddefaultsIdEndpoint: The initialized FinanceAgreementsIdBoarddefaultsIdEndpoint object. """ - child = FinanceAgreementsIdBoarddefaultsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdBoarddefaultsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardDefault]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardDefault]: """ Performs a GET request against the /finance/agreements/{id}/boardDefaults endpoint. @@ -64,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardDefault]: The parsed response data. """ - return self._parse_many(BoardDefault, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardDefault, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardDefault: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardDefault: """ Performs a POST request against the /finance/agreements/{id}/boardDefaults endpoint. @@ -76,4 +86,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardDefault: The parsed response data. """ - return self._parse_one(BoardDefault, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardDefault, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsIdEndpoint.py index 487ce9f94..a24f7e455 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdBoardDefaultsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardDefault: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardDefault: """ Performs a GET request against the /finance/agreements/{id}/boardDefaults/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardDefault: The parsed response data. """ - return self._parse_one(BoardDefault, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardDefault, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id}/boardDefaults/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardDefault: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardDefault: """ Performs a PUT request against the /finance/agreements/{id}/boardDefaults/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardDefault: The parsed response data. """ - return self._parse_one(BoardDefault, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardDefault, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardDefault: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardDefault: """ Performs a PATCH request against the /finance/agreements/{id}/boardDefaults/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardDefault: The parsed response data. """ - return self._parse_one(BoardDefault, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardDefault, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsCountEndpoint.py index 721a1a4e9..e85ed08d2 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdConfigurationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/{id}/configurations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/{id}/configurations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsEndpoint.py index 964b17d8d..536392be5 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdConfigurationsCountEndpoint import \ - FinanceAgreementsIdConfigurationsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdConfigurationsIdEndpoint import \ - FinanceAgreementsIdConfigurationsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdConfigurationsCountEndpoint import ( + FinanceAgreementsIdConfigurationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdConfigurationsIdEndpoint import ( + FinanceAgreementsIdConfigurationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> FinanceAgreementsIdConfigurationsIdEndpoint: Returns: FinanceAgreementsIdConfigurationsIdEndpoint: The initialized FinanceAgreementsIdConfigurationsIdEndpoint object. """ - child = FinanceAgreementsIdConfigurationsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdConfigurationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationReference]: """ Performs a GET request against the /finance/agreements/{id}/configurations endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ConfigurationReference]: The parsed response data. """ - return self._parse_many(ConfigurationReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ConfigurationReference, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationReference: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationReference: """ Performs a POST request against the /finance/agreements/{id}/configurations endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConfigurationReference: The parsed response data. """ - return self._parse_one(ConfigurationReference, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ConfigurationReference, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsIdEndpoint.py index 10c01dd25..aec67e3e6 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdConfigurationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationReference: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationReference: """ Performs a GET request against the /finance/agreements/{id}/configurations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationReference: The parsed response data. """ - return self._parse_one(ConfigurationReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConfigurationReference, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id}/configurations/{id} endpoint. @@ -55,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdCopyEndpoint.py index c05cc2132..e0f6efde5 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdCopyEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a POST request against the /finance/agreements/{id}/copy endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdEndpoint.py index d9b1d21c3..d551ab22b 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdEndpoint.py @@ -1,25 +1,45 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdditionsEndpoint import FinanceAgreementsIdAdditionsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdjustmentsEndpoint import FinanceAgreementsIdAdjustmentsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdApplicationparametersEndpoint import \ - FinanceAgreementsIdApplicationparametersEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdBoarddefaultsEndpoint import \ - FinanceAgreementsIdBoarddefaultsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdConfigurationsEndpoint import \ - FinanceAgreementsIdConfigurationsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdCopyEndpoint import FinanceAgreementsIdCopyEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdInvoiceEndpoint import FinanceAgreementsIdInvoiceEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdRecurringparametersEndpoint import \ - FinanceAgreementsIdRecurringparametersEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdSitesEndpoint import FinanceAgreementsIdSitesEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkroleexclusionsEndpoint import \ - FinanceAgreementsIdWorkroleexclusionsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkrolesEndpoint import FinanceAgreementsIdWorkrolesEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypeexclusionsEndpoint import \ - FinanceAgreementsIdWorktypeexclusionsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypesEndpoint import FinanceAgreementsIdWorktypesEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdditionsEndpoint import ( + FinanceAgreementsIdAdditionsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdAdjustmentsEndpoint import ( + FinanceAgreementsIdAdjustmentsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdApplicationparametersEndpoint import ( + FinanceAgreementsIdApplicationparametersEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdBoarddefaultsEndpoint import ( + FinanceAgreementsIdBoarddefaultsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdConfigurationsEndpoint import ( + FinanceAgreementsIdConfigurationsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdCopyEndpoint import ( + FinanceAgreementsIdCopyEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdInvoiceEndpoint import ( + FinanceAgreementsIdInvoiceEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdRecurringparametersEndpoint import ( + FinanceAgreementsIdRecurringparametersEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdSitesEndpoint import ( + FinanceAgreementsIdSitesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkroleexclusionsEndpoint import ( + FinanceAgreementsIdWorkroleexclusionsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkrolesEndpoint import ( + FinanceAgreementsIdWorkrolesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypeexclusionsEndpoint import ( + FinanceAgreementsIdWorktypeexclusionsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypesEndpoint import ( + FinanceAgreementsIdWorktypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Agreement from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -29,41 +49,51 @@ class FinanceAgreementsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.invoice = self._register_child_endpoint(FinanceAgreementsIdInvoiceEndpoint(client, parent_endpoint=self)) - self.work_type_exclusions = self._register_child_endpoint( - FinanceAgreementsIdWorktypeexclusionsEndpoint(client, parent_endpoint=self) + self.work_role_exclusions = self._register_child_endpoint( + FinanceAgreementsIdWorkroleexclusionsEndpoint(client, parent_endpoint=self) ) - self.application_parameters = self._register_child_endpoint( - FinanceAgreementsIdApplicationparametersEndpoint(client, parent_endpoint=self) + self.recurring_parameters = self._register_child_endpoint( + FinanceAgreementsIdRecurringparametersEndpoint(client, parent_endpoint=self) ) - self.worktypes = self._register_child_endpoint( - FinanceAgreementsIdWorktypesEndpoint(client, parent_endpoint=self) + self.board_defaults = self._register_child_endpoint( + FinanceAgreementsIdBoarddefaultsEndpoint(client, parent_endpoint=self) + ) + self.adjustments = self._register_child_endpoint( + FinanceAgreementsIdAdjustmentsEndpoint(client, parent_endpoint=self) + ) + self.application_parameters = self._register_child_endpoint( + FinanceAgreementsIdApplicationparametersEndpoint( + client, parent_endpoint=self + ) ) self.workroles = self._register_child_endpoint( FinanceAgreementsIdWorkrolesEndpoint(client, parent_endpoint=self) ) - self.adjustments = self._register_child_endpoint( - FinanceAgreementsIdAdjustmentsEndpoint(client, parent_endpoint=self) + self.sites = self._register_child_endpoint( + FinanceAgreementsIdSitesEndpoint(client, parent_endpoint=self) + ) + self.copy = self._register_child_endpoint( + FinanceAgreementsIdCopyEndpoint(client, parent_endpoint=self) + ) + self.worktypes = self._register_child_endpoint( + FinanceAgreementsIdWorktypesEndpoint(client, parent_endpoint=self) ) self.additions = self._register_child_endpoint( FinanceAgreementsIdAdditionsEndpoint(client, parent_endpoint=self) ) + self.work_type_exclusions = self._register_child_endpoint( + FinanceAgreementsIdWorktypeexclusionsEndpoint(client, parent_endpoint=self) + ) self.configurations = self._register_child_endpoint( FinanceAgreementsIdConfigurationsEndpoint(client, parent_endpoint=self) ) - self.copy = self._register_child_endpoint(FinanceAgreementsIdCopyEndpoint(client, parent_endpoint=self)) - self.recurring_parameters = self._register_child_endpoint( - FinanceAgreementsIdRecurringparametersEndpoint(client, parent_endpoint=self) - ) - self.board_defaults = self._register_child_endpoint( - FinanceAgreementsIdBoarddefaultsEndpoint(client, parent_endpoint=self) - ) - self.sites = self._register_child_endpoint(FinanceAgreementsIdSitesEndpoint(client, parent_endpoint=self)) - self.work_role_exclusions = self._register_child_endpoint( - FinanceAgreementsIdWorkroleexclusionsEndpoint(client, parent_endpoint=self) + self.invoice = self._register_child_endpoint( + FinanceAgreementsIdInvoiceEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Agreement]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Agreement]: """ Performs a GET request against the /finance/agreements/{id} endpoint and returns an initialized PaginatedResponse object. @@ -84,7 +114,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a GET request against the /finance/agreements/{id} endpoint. @@ -94,9 +126,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id} endpoint. @@ -106,9 +142,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a PUT request against the /finance/agreements/{id} endpoint. @@ -118,9 +159,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a PATCH request against the /finance/agreements/{id} endpoint. @@ -130,4 +175,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdRecurringparametersEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdRecurringparametersEndpoint.py index d4470c05e..91ab60bda 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdRecurringparametersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdRecurringparametersEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdRecurringparametersIdEndpoint import \ - FinanceAgreementsIdRecurringparametersIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdRecurringparametersIdEndpoint import ( + FinanceAgreementsIdRecurringparametersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> FinanceAgreementsIdRecurringparametersIdEndpoint: Returns: FinanceAgreementsIdRecurringparametersIdEndpoint: The initialized FinanceAgreementsIdRecurringparametersIdEndpoint object. """ - child = FinanceAgreementsIdRecurringparametersIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdRecurringparametersIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdRecurringparametersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdRecurringparametersIdEndpoint.py index b61f7603f..04c931a92 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdRecurringparametersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdRecurringparametersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementRecurringParameters: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementRecurringParameters: """ Performs a GET request against the /finance/agreements/{id}/recurringParameters/{id} endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A AgreementRecurringParameters: The parsed response data. """ return self._parse_one( - AgreementRecurringParameters, super()._make_request("GET", data=data, params=params).json() + AgreementRecurringParameters, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesCountEndpoint.py index cba5c6089..c00f96515 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdSitesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/{id}/sites/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/{id}/sites/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesEndpoint.py index cbfbda4bd..c2ce28c95 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdSitesCountEndpoint import FinanceAgreementsIdSitesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdSitesIdEndpoint import FinanceAgreementsIdSitesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdSitesCountEndpoint import ( + FinanceAgreementsIdSitesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdSitesIdEndpoint import ( + FinanceAgreementsIdSitesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementSite from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceAgreementsIdSitesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "sites", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceAgreementsIdSitesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceAgreementsIdSitesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceAgreementsIdSitesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementSite]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementSite]: """ Performs a GET request against the /finance/agreements/{id}/sites endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AgreementSite]: The parsed response data. """ - return self._parse_many(AgreementSite, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AgreementSite, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementSite: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementSite: """ Performs a POST request against the /finance/agreements/{id}/sites endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementSite: The parsed response data. """ - return self._parse_one(AgreementSite, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AgreementSite, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesIdEndpoint.py index b8bfe399b..a804c1255 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdSitesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementSite: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementSite: """ Performs a GET request against the /finance/agreements/{id}/sites/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementSite: The parsed response data. """ - return self._parse_one(AgreementSite, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementSite, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id}/sites/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementSite: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementSite: """ Performs a PUT request against the /finance/agreements/{id}/sites/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementSite: The parsed response data. """ - return self._parse_one(AgreementSite, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AgreementSite, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementSite: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementSite: """ Performs a PATCH request against the /finance/agreements/{id}/sites/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementSite: The parsed response data. """ - return self._parse_one(AgreementSite, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AgreementSite, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsCountEndpoint.py index 5cea3aec9..574a52184 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdWorkroleexclusionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/{id}/workRoleExclusions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/{id}/workRoleExclusions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsEndpoint.py index 2aadc065b..2f2758594 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkroleexclusionsCountEndpoint import \ - FinanceAgreementsIdWorkroleexclusionsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkroleexclusionsIdEndpoint import \ - FinanceAgreementsIdWorkroleexclusionsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkroleexclusionsCountEndpoint import ( + FinanceAgreementsIdWorkroleexclusionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkroleexclusionsIdEndpoint import ( + FinanceAgreementsIdWorkroleexclusionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementWorkRoleExclusion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "workRoleExclusions", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAgreementsIdWorkroleexclusionsCountEndpoint(client, parent_endpoint=self) + FinanceAgreementsIdWorkroleexclusionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceAgreementsIdWorkroleexclusionsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAgreementsIdWorkroleexclusionsIdEndpoint: Returns: FinanceAgreementsIdWorkroleexclusionsIdEndpoint: The initialized FinanceAgreementsIdWorkroleexclusionsIdEndpoint object. """ - child = FinanceAgreementsIdWorkroleexclusionsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdWorkroleexclusionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementWorkRoleExclusion]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementWorkRoleExclusion]: """ Performs a GET request against the /finance/agreements/{id}/workRoleExclusions endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[AgreementWorkRoleExclusion]: The parsed response data. """ return self._parse_many( - AgreementWorkRoleExclusion, super()._make_request("GET", data=data, params=params).json() + AgreementWorkRoleExclusion, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkRoleExclusion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkRoleExclusion: """ Performs a POST request against the /finance/agreements/{id}/workRoleExclusions endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkRoleExclusion: The parsed response data. """ return self._parse_one( - AgreementWorkRoleExclusion, super()._make_request("POST", data=data, params=params).json() + AgreementWorkRoleExclusion, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsIdEndpoint.py index 292dd64e1..946da15d5 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkRoleExclusionsIdEndpoint.py @@ -9,7 +9,9 @@ class FinanceAgreementsIdWorkroleexclusionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id}/workRoleExclusions/{id} endpoint. @@ -19,4 +21,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsCountEndpoint.py index 2ad72c956..4b88cd00d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdWorktypeexclusionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/{id}/workTypeExclusions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/{id}/workTypeExclusions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsEndpoint.py index 1c0c5d640..1d7d6a09f 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypeexclusionsCountEndpoint import \ - FinanceAgreementsIdWorktypeexclusionsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypeexclusionsIdEndpoint import \ - FinanceAgreementsIdWorktypeexclusionsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypeexclusionsCountEndpoint import ( + FinanceAgreementsIdWorktypeexclusionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypeexclusionsIdEndpoint import ( + FinanceAgreementsIdWorktypeexclusionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementWorkTypeExclusion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "workTypeExclusions", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceAgreementsIdWorktypeexclusionsCountEndpoint(client, parent_endpoint=self) + FinanceAgreementsIdWorktypeexclusionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceAgreementsIdWorktypeexclusionsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceAgreementsIdWorktypeexclusionsIdEndpoint: Returns: FinanceAgreementsIdWorktypeexclusionsIdEndpoint: The initialized FinanceAgreementsIdWorktypeexclusionsIdEndpoint object. """ - child = FinanceAgreementsIdWorktypeexclusionsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdWorktypeexclusionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementWorkTypeExclusion]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementWorkTypeExclusion]: """ Performs a GET request against the /finance/agreements/{id}/workTypeExclusions endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[AgreementWorkTypeExclusion]: The parsed response data. """ return self._parse_many( - AgreementWorkTypeExclusion, super()._make_request("GET", data=data, params=params).json() + AgreementWorkTypeExclusion, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkTypeExclusion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkTypeExclusion: """ Performs a POST request against the /finance/agreements/{id}/workTypeExclusions endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkTypeExclusion: The parsed response data. """ return self._parse_one( - AgreementWorkTypeExclusion, super()._make_request("POST", data=data, params=params).json() + AgreementWorkTypeExclusion, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsIdEndpoint.py index ff73cc457..bdf5e72f6 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkTypeExclusionsIdEndpoint.py @@ -9,7 +9,9 @@ class FinanceAgreementsIdWorktypeexclusionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id}/workTypeExclusions/{id} endpoint. @@ -19,4 +21,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesCountEndpoint.py index 2f09c980c..7fab02a92 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdWorkrolesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/{id}/workroles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/{id}/workroles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesEndpoint.py index 0daafaa94..37bbe3c20 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkrolesCountEndpoint import \ - FinanceAgreementsIdWorkrolesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkrolesIdEndpoint import FinanceAgreementsIdWorkrolesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkrolesCountEndpoint import ( + FinanceAgreementsIdWorkrolesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorkrolesIdEndpoint import ( + FinanceAgreementsIdWorkrolesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementWorkRole from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> FinanceAgreementsIdWorkrolesIdEndpoint: Returns: FinanceAgreementsIdWorkrolesIdEndpoint: The initialized FinanceAgreementsIdWorkrolesIdEndpoint object. """ - child = FinanceAgreementsIdWorkrolesIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdWorkrolesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementWorkRole]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementWorkRole]: """ Performs a GET request against the /finance/agreements/{id}/workroles endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AgreementWorkRole]: The parsed response data. """ - return self._parse_many(AgreementWorkRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AgreementWorkRole, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkRole: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkRole: """ Performs a POST request against the /finance/agreements/{id}/workroles endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementWorkRole: The parsed response data. """ - return self._parse_one(AgreementWorkRole, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AgreementWorkRole, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesIdEndpoint.py index 1597810e9..b834f869f 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorkrolesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkRole: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkRole: """ Performs a GET request against the /finance/agreements/{id}/workroles/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementWorkRole: The parsed response data. """ - return self._parse_one(AgreementWorkRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementWorkRole, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id}/workroles/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkRole: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkRole: """ Performs a PUT request against the /finance/agreements/{id}/workroles/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementWorkRole: The parsed response data. """ - return self._parse_one(AgreementWorkRole, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AgreementWorkRole, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkRole: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkRole: """ Performs a PATCH request against the /finance/agreements/{id}/workroles/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementWorkRole: The parsed response data. """ - return self._parse_one(AgreementWorkRole, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AgreementWorkRole, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesCountEndpoint.py index 9bf7f9a59..83bd2f5f6 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsIdWorktypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/{id}/worktypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/{id}/worktypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesEndpoint.py index 8904f3491..3e33290d1 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypesCountEndpoint import \ - FinanceAgreementsIdWorktypesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypesIdEndpoint import FinanceAgreementsIdWorktypesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypesCountEndpoint import ( + FinanceAgreementsIdWorktypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsIdWorktypesIdEndpoint import ( + FinanceAgreementsIdWorktypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementWorkType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> FinanceAgreementsIdWorktypesIdEndpoint: Returns: FinanceAgreementsIdWorktypesIdEndpoint: The initialized FinanceAgreementsIdWorktypesIdEndpoint object. """ - child = FinanceAgreementsIdWorktypesIdEndpoint(self.client, parent_endpoint=self) + child = FinanceAgreementsIdWorktypesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementWorkType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementWorkType]: """ Performs a GET request against the /finance/agreements/{id}/worktypes endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AgreementWorkType]: The parsed response data. """ - return self._parse_many(AgreementWorkType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AgreementWorkType, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkType: """ Performs a POST request against the /finance/agreements/{id}/worktypes endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementWorkType: The parsed response data. """ - return self._parse_one(AgreementWorkType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AgreementWorkType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesIdEndpoint.py index 81656c994..b8a57c509 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsIdWorktypesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkType: """ Performs a GET request against the /finance/agreements/{id}/worktypes/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementWorkType: The parsed response data. """ - return self._parse_one(AgreementWorkType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementWorkType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/{id}/worktypes/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkType: """ Performs a PUT request against the /finance/agreements/{id}/worktypes/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementWorkType: The parsed response data. """ - return self._parse_one(AgreementWorkType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AgreementWorkType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementWorkType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementWorkType: """ Performs a PATCH request against the /finance/agreements/{id}/worktypes/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementWorkType: The parsed response data. """ - return self._parse_one(AgreementWorkType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AgreementWorkType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesCountEndpoint.py index e1fdb93ab..be041e971 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesEndpoint.py index 17d2589b5..95ce67f1c 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsTypesCountEndpoint import FinanceAgreementsTypesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdEndpoint import FinanceAgreementsTypesIdEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsTypesInfoEndpoint import FinanceAgreementsTypesInfoEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsTypesCountEndpoint import ( + FinanceAgreementsTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdEndpoint import ( + FinanceAgreementsTypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsTypesInfoEndpoint import ( + FinanceAgreementsTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class FinanceAgreementsTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceAgreementsTypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(FinanceAgreementsTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceAgreementsTypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceAgreementsTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceAgreementsTypesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementType]: """ Performs a GET request against the /finance/agreements/types endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AgreementType]: The parsed response data. """ - return self._parse_many(AgreementType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AgreementType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementType: """ Performs a POST request against the /finance/agreements/types endpoint. @@ -74,4 +90,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementType: The parsed response data. """ - return self._parse_one(AgreementType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AgreementType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdCopyEndpoint.py index eb345e4f7..aca22a8fe 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdCopyEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsTypesIdCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementType: """ Performs a POST request against the /finance/agreements/types/{id}/copy endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementType: The parsed response data. """ - return self._parse_one(AgreementType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AgreementType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdEndpoint.py index 1291778b4..85ab36262 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdCopyEndpoint import FinanceAgreementsTypesIdCopyEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdInfoEndpoint import FinanceAgreementsTypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdUsagesEndpoint import FinanceAgreementsTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdCopyEndpoint import ( + FinanceAgreementsTypesIdCopyEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdInfoEndpoint import ( + FinanceAgreementsTypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdUsagesEndpoint import ( + FinanceAgreementsTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,11 +19,15 @@ class FinanceAgreementsTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceAgreementsTypesIdInfoEndpoint(client, parent_endpoint=self)) self.usages = self._register_child_endpoint( FinanceAgreementsTypesIdUsagesEndpoint(client, parent_endpoint=self) ) - self.copy = self._register_child_endpoint(FinanceAgreementsTypesIdCopyEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + FinanceAgreementsTypesIdInfoEndpoint(client, parent_endpoint=self) + ) + self.copy = self._register_child_endpoint( + FinanceAgreementsTypesIdCopyEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -42,7 +52,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementType: """ Performs a GET request against the /finance/agreements/types/{id} endpoint. @@ -52,9 +64,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementType: The parsed response data. """ - return self._parse_one(AgreementType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/agreements/types/{id} endpoint. @@ -64,9 +80,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementType: """ Performs a PUT request against the /finance/agreements/types/{id} endpoint. @@ -76,9 +97,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementType: The parsed response data. """ - return self._parse_one(AgreementType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AgreementType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementType: """ Performs a PATCH request against the /finance/agreements/types/{id} endpoint. @@ -88,4 +113,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementType: The parsed response data. """ - return self._parse_one(AgreementType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AgreementType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdInfoEndpoint.py index 740e0a615..075b91108 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementTypeInfo: """ Performs a GET request against the /finance/agreements/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementTypeInfo: The parsed response data. """ - return self._parse_one(AgreementTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdUsagesEndpoint.py index 9f58f88c1..260a30f2a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdUsagesListEndpoint import \ - FinanceAgreementsTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsTypesIdUsagesListEndpoint import ( + FinanceAgreementsTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): FinanceAgreementsTypesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/agreements/types/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/agreements/types/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdUsagesListEndpoint.py index fc669a29b..4af0af31b 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/agreements/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/agreements/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesInfoCountEndpoint.py index 726fee77f..50a97af20 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceAgreementsTypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/agreements/types/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/agreements/types/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesInfoEndpoint.py index 7bc50c358..3f6995cfd 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementsTypesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsTypesInfoCountEndpoint import \ - FinanceAgreementsTypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementsTypesInfoCountEndpoint import ( + FinanceAgreementsTypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementTypeInfo]: """ Performs a GET request against the /finance/agreements/types/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AgreementTypeInfo]: The parsed response data. """ - return self._parse_many(AgreementTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AgreementTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementtypesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementtypesEndpoint.py index a73a97ffc..d61d91a74 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementtypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementtypesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdEndpoint import FinanceAgreementtypesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdEndpoint import ( + FinanceAgreementtypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/FinanceAgreementtypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceAgreementtypesIdEndpoint.py index 8b944f394..28aa9a374 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceAgreementtypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceAgreementtypesIdEndpoint.py @@ -1,16 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdBoarddefaultsEndpoint import \ - FinanceAgreementtypesIdBoarddefaultsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkroleexclusionsEndpoint import \ - FinanceAgreementtypesIdWorkroleexclusionsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesEndpoint import \ - FinanceAgreementtypesIdWorkrolesEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypeexclusionsEndpoint import \ - FinanceAgreementtypesIdWorktypeexclusionsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypesEndpoint import \ - FinanceAgreementtypesIdWorktypesEndpoint +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdBoarddefaultsEndpoint import ( + FinanceAgreementtypesIdBoarddefaultsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkroleexclusionsEndpoint import ( + FinanceAgreementtypesIdWorkroleexclusionsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorkrolesEndpoint import ( + FinanceAgreementtypesIdWorkrolesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypeexclusionsEndpoint import ( + FinanceAgreementtypesIdWorktypeexclusionsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesIdWorktypesEndpoint import ( + FinanceAgreementtypesIdWorktypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -19,18 +24,22 @@ class FinanceAgreementtypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.work_type_exclusions = self._register_child_endpoint( - FinanceAgreementtypesIdWorktypeexclusionsEndpoint(client, parent_endpoint=self) + self.work_role_exclusions = self._register_child_endpoint( + FinanceAgreementtypesIdWorkroleexclusionsEndpoint( + client, parent_endpoint=self + ) ) - self.worktypes = self._register_child_endpoint( - FinanceAgreementtypesIdWorktypesEndpoint(client, parent_endpoint=self) + self.board_defaults = self._register_child_endpoint( + FinanceAgreementtypesIdBoarddefaultsEndpoint(client, parent_endpoint=self) ) self.workroles = self._register_child_endpoint( FinanceAgreementtypesIdWorkrolesEndpoint(client, parent_endpoint=self) ) - self.board_defaults = self._register_child_endpoint( - FinanceAgreementtypesIdBoarddefaultsEndpoint(client, parent_endpoint=self) + self.worktypes = self._register_child_endpoint( + FinanceAgreementtypesIdWorktypesEndpoint(client, parent_endpoint=self) ) - self.work_role_exclusions = self._register_child_endpoint( - FinanceAgreementtypesIdWorkroleexclusionsEndpoint(client, parent_endpoint=self) + self.work_type_exclusions = self._register_child_endpoint( + FinanceAgreementtypesIdWorktypeexclusionsEndpoint( + client, parent_endpoint=self + ) ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsCountEndpoint.py index 5152181a3..80fc29699 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceBatchsetupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/batchSetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/batchSetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsEndpoint.py index 42fa4586c..b95621f22 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBatchsetupsCountEndpoint import FinanceBatchsetupsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceBatchsetupsIdEndpoint import FinanceBatchsetupsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceBatchsetupsCountEndpoint import ( + FinanceBatchsetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBatchsetupsIdEndpoint import ( + FinanceBatchsetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AgreementBatchSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceBatchsetupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "batchSetups", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceBatchsetupsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceBatchsetupsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceBatchsetupsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AgreementBatchSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AgreementBatchSetup]: """ Performs a GET request against the /finance/batchSetups endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AgreementBatchSetup]: The parsed response data. """ - return self._parse_many(AgreementBatchSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AgreementBatchSetup, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsIdEndpoint.py index a7b83f9a6..38d3fc3d0 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBatchSetupsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementBatchSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementBatchSetup: """ Performs a GET request against the /finance/batchSetups/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementBatchSetup: The parsed response data. """ - return self._parse_one(AgreementBatchSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AgreementBatchSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementBatchSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementBatchSetup: """ Performs a PUT request against the /finance/batchSetups/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AgreementBatchSetup: The parsed response data. """ - return self._parse_one(AgreementBatchSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AgreementBatchSetup, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AgreementBatchSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AgreementBatchSetup: """ Performs a PATCH request against the /finance/batchSetups/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AgreementBatchSetup: The parsed response data. """ - return self._parse_one(AgreementBatchSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AgreementBatchSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesCountEndpoint.py index 59084c9c8..2ec18ecb4 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingcyclesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/billingCycles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/billingCycles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesEndpoint.py index 56c2be28f..2d413e987 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingcyclesCountEndpoint import FinanceBillingcyclesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingcyclesIdEndpoint import FinanceBillingcyclesIdEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingcyclesInfoEndpoint import FinanceBillingcyclesInfoEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingcyclesCountEndpoint import ( + FinanceBillingcyclesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingcyclesIdEndpoint import ( + FinanceBillingcyclesIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingcyclesInfoEndpoint import ( + FinanceBillingcyclesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingCycle from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class FinanceBillingcyclesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "billingCycles", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceBillingcyclesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(FinanceBillingcyclesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceBillingcyclesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceBillingcyclesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceBillingcyclesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BillingCycle]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BillingCycle]: """ Performs a GET request against the /finance/billingCycles endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BillingCycle]: The parsed response data. """ - return self._parse_many(BillingCycle, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BillingCycle, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingCycle: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingCycle: """ Performs a POST request against the /finance/billingCycles endpoint. @@ -74,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingCycle: The parsed response data. """ - return self._parse_one(BillingCycle, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BillingCycle, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdEndpoint.py index 91b7915a9..1fc65f283 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingcyclesIdInfoEndpoint import FinanceBillingcyclesIdInfoEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingcyclesIdUsagesEndpoint import FinanceBillingcyclesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingcyclesIdInfoEndpoint import ( + FinanceBillingcyclesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingcyclesIdUsagesEndpoint import ( + FinanceBillingcyclesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingCycle from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,8 +16,12 @@ class FinanceBillingcyclesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceBillingcyclesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(FinanceBillingcyclesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + FinanceBillingcyclesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceBillingcyclesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -38,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingCycle: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingCycle: """ Performs a GET request against the /finance/billingCycles/{id} endpoint. @@ -48,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingCycle: The parsed response data. """ - return self._parse_one(BillingCycle, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BillingCycle, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/billingCycles/{id} endpoint. @@ -60,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingCycle: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingCycle: """ Performs a PUT request against the /finance/billingCycles/{id} endpoint. @@ -72,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingCycle: The parsed response data. """ - return self._parse_one(BillingCycle, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BillingCycle, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingCycle: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingCycle: """ Performs a PATCH request against the /finance/billingCycles/{id} endpoint. @@ -84,4 +107,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingCycle: The parsed response data. """ - return self._parse_one(BillingCycle, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BillingCycle, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdInfoEndpoint.py index f01fb443a..079ac6f4e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingCycleInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingCycleInfo: """ Performs a GET request against the /finance/billingCycles/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingCycleInfo: The parsed response data. """ - return self._parse_one(BillingCycleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BillingCycleInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdUsagesEndpoint.py index de9c377b8..22bd73426 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingcyclesIdUsagesListEndpoint import \ - FinanceBillingcyclesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingcyclesIdUsagesListEndpoint import ( + FinanceBillingcyclesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): FinanceBillingcyclesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/billingCycles/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/billingCycles/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdUsagesListEndpoint.py index 0423495b9..20e106051 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingcyclesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/billingCycles/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/billingCycles/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesInfoCountEndpoint.py index 7564c4030..09c087a2d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingcyclesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/billingCycles/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/billingCycles/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesInfoEndpoint.py index d29a2fd32..bf8d622e4 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingCyclesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingcyclesInfoCountEndpoint import FinanceBillingcyclesInfoCountEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingcyclesInfoCountEndpoint import ( + FinanceBillingcyclesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingCycleInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class FinanceBillingcyclesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceBillingcyclesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceBillingcyclesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BillingCycleInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BillingCycleInfo]: """ Performs a GET request against the /finance/billingCycles/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BillingCycleInfo]: The parsed response data. """ - return self._parse_many(BillingCycleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BillingCycleInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsCountEndpoint.py index 5c45a497e..74341c674 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingsetupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/billingSetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/billingSetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsEndpoint.py index 052467f1a..34574a81f 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingsetupsCountEndpoint import FinanceBillingsetupsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdEndpoint import FinanceBillingsetupsIdEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingsetupsInfoEndpoint import FinanceBillingsetupsInfoEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingsetupsCountEndpoint import ( + FinanceBillingsetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdEndpoint import ( + FinanceBillingsetupsIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingsetupsInfoEndpoint import ( + FinanceBillingsetupsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class FinanceBillingsetupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "billingSetups", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceBillingsetupsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(FinanceBillingsetupsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceBillingsetupsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceBillingsetupsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceBillingsetupsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BillingSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BillingSetup]: """ Performs a GET request against the /finance/billingSetups endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BillingSetup]: The parsed response data. """ - return self._parse_many(BillingSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BillingSetup, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingSetup: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingSetup: """ Performs a POST request against the /finance/billingSetups endpoint. @@ -74,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingSetup: The parsed response data. """ - return self._parse_one(BillingSetup, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BillingSetup, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdEndpoint.py index d70f73eed..81dc7f602 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdInfoEndpoint import FinanceBillingsetupsIdInfoEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdRoutingsEndpoint import FinanceBillingsetupsIdRoutingsEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdInfoEndpoint import ( + FinanceBillingsetupsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdRoutingsEndpoint import ( + FinanceBillingsetupsIdRoutingsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,12 @@ class FinanceBillingsetupsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceBillingsetupsIdInfoEndpoint(client, parent_endpoint=self)) self.routings = self._register_child_endpoint( FinanceBillingsetupsIdRoutingsEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + FinanceBillingsetupsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -40,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingSetup: """ Performs a GET request against the /finance/billingSetups/{id} endpoint. @@ -50,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingSetup: The parsed response data. """ - return self._parse_one(BillingSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BillingSetup, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/billingSetups/{id} endpoint. @@ -62,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingSetup: """ Performs a PUT request against the /finance/billingSetups/{id} endpoint. @@ -74,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingSetup: The parsed response data. """ - return self._parse_one(BillingSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BillingSetup, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingSetup: """ Performs a PATCH request against the /finance/billingSetups/{id} endpoint. @@ -86,4 +107,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingSetup: The parsed response data. """ - return self._parse_one(BillingSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BillingSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdInfoEndpoint.py index 10b671ad0..2818129e5 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingSetupInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingSetupInfo: """ Performs a GET request against the /finance/billingSetups/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingSetupInfo: The parsed response data. """ - return self._parse_one(BillingSetupInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BillingSetupInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsCountEndpoint.py index 55e52c96d..e2a98cadb 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingsetupsIdRoutingsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/billingSetups/{id}/routings/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/billingSetups/{id}/routings/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsEndpoint.py index 51f6d22fc..96e7fc96c 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdRoutingsCountEndpoint import \ - FinanceBillingsetupsIdRoutingsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdRoutingsIdEndpoint import \ - FinanceBillingsetupsIdRoutingsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdRoutingsCountEndpoint import ( + FinanceBillingsetupsIdRoutingsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingsetupsIdRoutingsIdEndpoint import ( + FinanceBillingsetupsIdRoutingsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingSetupRouting from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> FinanceBillingsetupsIdRoutingsIdEndpoint: Returns: FinanceBillingsetupsIdRoutingsIdEndpoint: The initialized FinanceBillingsetupsIdRoutingsIdEndpoint object. """ - child = FinanceBillingsetupsIdRoutingsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceBillingsetupsIdRoutingsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BillingSetupRouting]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BillingSetupRouting]: """ Performs a GET request against the /finance/billingSetups/{id}/routings endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BillingSetupRouting]: The parsed response data. """ - return self._parse_many(BillingSetupRouting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BillingSetupRouting, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingSetupRouting: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingSetupRouting: """ Performs a POST request against the /finance/billingSetups/{id}/routings endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingSetupRouting: The parsed response data. """ - return self._parse_one(BillingSetupRouting, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BillingSetupRouting, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsIdEndpoint.py index 7803c957e..369182dc0 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsIdRoutingsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingSetupRouting: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingSetupRouting: """ Performs a GET request against the /finance/billingSetups/{id}/routings/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingSetupRouting: The parsed response data. """ - return self._parse_one(BillingSetupRouting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BillingSetupRouting, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/billingSetups/{id}/routings/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingSetupRouting: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingSetupRouting: """ Performs a PUT request against the /finance/billingSetups/{id}/routings/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingSetupRouting: The parsed response data. """ - return self._parse_one(BillingSetupRouting, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BillingSetupRouting, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingSetupRouting: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingSetupRouting: """ Performs a PATCH request against the /finance/billingSetups/{id}/routings/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingSetupRouting: The parsed response data. """ - return self._parse_one(BillingSetupRouting, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BillingSetupRouting, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsInfoEndpoint.py index 4bfcb04d7..3595b6b83 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingSetupsInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BillingSetupInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BillingSetupInfo]: """ Performs a GET request against the /finance/billingSetups/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BillingSetupInfo]: The parsed response data. """ - return self._parse_many(BillingSetupInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BillingSetupInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesCountEndpoint.py index ac3130c06..948ea8a99 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingstatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/billingStatuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/billingStatuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesEndpoint.py index a864be4ca..b17d437f3 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingstatusesCountEndpoint import FinanceBillingstatusesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingstatusesIdEndpoint import FinanceBillingstatusesIdEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingstatusesInfoEndpoint import FinanceBillingstatusesInfoEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingstatusesCountEndpoint import ( + FinanceBillingstatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingstatusesIdEndpoint import ( + FinanceBillingstatusesIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingstatusesInfoEndpoint import ( + FinanceBillingstatusesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class FinanceBillingstatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "billingStatuses", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceBillingstatusesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(FinanceBillingstatusesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceBillingstatusesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceBillingstatusesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceBillingstatusesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BillingStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BillingStatus]: """ Performs a GET request against the /finance/billingStatuses endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BillingStatus]: The parsed response data. """ - return self._parse_many(BillingStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BillingStatus, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingStatus: """ Performs a POST request against the /finance/billingStatuses endpoint. @@ -74,4 +90,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingStatus: The parsed response data. """ - return self._parse_one(BillingStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BillingStatus, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdEndpoint.py index 0e2c1a33e..a4b73fb6c 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingstatusesIdInfoEndpoint import FinanceBillingstatusesIdInfoEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingstatusesIdUsagesEndpoint import FinanceBillingstatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingstatusesIdInfoEndpoint import ( + FinanceBillingstatusesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingstatusesIdUsagesEndpoint import ( + FinanceBillingstatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,12 @@ class FinanceBillingstatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceBillingstatusesIdInfoEndpoint(client, parent_endpoint=self)) self.usages = self._register_child_endpoint( FinanceBillingstatusesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + FinanceBillingstatusesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -40,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingStatus: """ Performs a GET request against the /finance/billingStatuses/{id} endpoint. @@ -50,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingStatus: The parsed response data. """ - return self._parse_one(BillingStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BillingStatus, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/billingStatuses/{id} endpoint. @@ -62,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingStatus: """ Performs a PUT request against the /finance/billingStatuses/{id} endpoint. @@ -74,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingStatus: The parsed response data. """ - return self._parse_one(BillingStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BillingStatus, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingStatus: """ Performs a PATCH request against the /finance/billingStatuses/{id} endpoint. @@ -86,4 +107,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingStatus: The parsed response data. """ - return self._parse_one(BillingStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BillingStatus, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdInfoEndpoint.py index 8154fd3c1..612bb2d12 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingStatusInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingStatusInfo: """ Performs a GET request against the /finance/billingStatuses/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingStatusInfo: The parsed response data. """ - return self._parse_one(BillingStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BillingStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdUsagesEndpoint.py index b14c8bcae..f6fe14977 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingstatusesIdUsagesListEndpoint import \ - FinanceBillingstatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingstatusesIdUsagesListEndpoint import ( + FinanceBillingstatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): FinanceBillingstatusesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/billingStatuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/billingStatuses/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdUsagesListEndpoint.py index 1f7fed5b6..732b5c554 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingstatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/billingStatuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/billingStatuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesInfoCountEndpoint.py index 2da708b46..96cd6d6ae 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingstatusesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/billingStatuses/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/billingStatuses/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesInfoEndpoint.py index 441c314a6..ba3305daa 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingStatusesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingstatusesInfoCountEndpoint import \ - FinanceBillingstatusesInfoCountEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingstatusesInfoCountEndpoint import ( + FinanceBillingstatusesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingStatusInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BillingStatusInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BillingStatusInfo]: """ Performs a GET request against the /finance/billingStatuses/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BillingStatusInfo]: The parsed response data. """ - return self._parse_many(BillingStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BillingStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsCountEndpoint.py index a048349c8..d387347b2 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingtermsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/billingTerms/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/billingTerms/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsEndpoint.py index 8422ccab7..cfedaa455 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingtermsCountEndpoint import FinanceBillingtermsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingtermsIdEndpoint import FinanceBillingtermsIdEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingtermsInfoEndpoint import FinanceBillingtermsInfoEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingtermsCountEndpoint import ( + FinanceBillingtermsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingtermsIdEndpoint import ( + FinanceBillingtermsIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingtermsInfoEndpoint import ( + FinanceBillingtermsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingTerm from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class FinanceBillingtermsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "billingTerms", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceBillingtermsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(FinanceBillingtermsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceBillingtermsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceBillingtermsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceBillingtermsIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> FinanceBillingtermsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BillingTerm]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BillingTerm]: """ Performs a GET request against the /finance/billingTerms endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BillingTerm]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BillingTerm]: """ Performs a GET request against the /finance/billingTerms endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BillingTerm]: The parsed response data. """ - return self._parse_many(BillingTerm, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BillingTerm, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingTerm: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingTerm: """ Performs a POST request against the /finance/billingTerms endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingTerm: The parsed response data. """ - return self._parse_one(BillingTerm, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BillingTerm, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdEndpoint.py index 0eadbb26f..a4d2c0d78 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingtermsIdInfoEndpoint import FinanceBillingtermsIdInfoEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingtermsIdUsagesEndpoint import FinanceBillingtermsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingtermsIdInfoEndpoint import ( + FinanceBillingtermsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingtermsIdUsagesEndpoint import ( + FinanceBillingtermsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingTerm from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class FinanceBillingtermsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceBillingtermsIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(FinanceBillingtermsIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + FinanceBillingtermsIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceBillingtermsIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BillingTerm]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BillingTerm]: """ Performs a GET request against the /finance/billingTerms/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingTerm: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingTerm: """ Performs a GET request against the /finance/billingTerms/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingTerm: The parsed response data. """ - return self._parse_one(BillingTerm, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BillingTerm, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/billingTerms/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingTerm: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingTerm: """ Performs a PUT request against the /finance/billingTerms/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingTerm: The parsed response data. """ - return self._parse_one(BillingTerm, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BillingTerm, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingTerm: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingTerm: """ Performs a PATCH request against the /finance/billingTerms/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BillingTerm: The parsed response data. """ - return self._parse_one(BillingTerm, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BillingTerm, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdInfoEndpoint.py index 25485ff8e..d576b4c5e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BillingTermInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BillingTermInfo: """ Performs a GET request against the /finance/billingTerms/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BillingTermInfo: The parsed response data. """ - return self._parse_one(BillingTermInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BillingTermInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdUsagesEndpoint.py index acadc0819..0a7b1c80b 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingtermsIdUsagesListEndpoint import \ - FinanceBillingtermsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingtermsIdUsagesListEndpoint import ( + FinanceBillingtermsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,9 +13,13 @@ class FinanceBillingtermsIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(FinanceBillingtermsIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + FinanceBillingtermsIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/billingTerms/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -35,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/billingTerms/{id}/usages endpoint. @@ -45,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdUsagesListEndpoint.py index 1da4ef8a0..fce993f95 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingtermsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/billingTerms/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/billingTerms/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsInfoCountEndpoint.py index 77a23e479..2e5d0adee 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceBillingtermsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/billingTerms/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/billingTerms/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsInfoEndpoint.py index 8566d1c38..d48579b25 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceBillingTermsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceBillingTermsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingtermsInfoCountEndpoint import FinanceBillingtermsInfoCountEndpoint +from pyconnectwise.endpoints.manage.FinanceBillingtermsInfoCountEndpoint import ( + FinanceBillingtermsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BillingTermInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class FinanceBillingtermsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceBillingtermsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceBillingtermsInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BillingTermInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BillingTermInfo]: """ Performs a GET request against the /finance/billingTerms/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BillingTermInfo]: The parsed response data. """ - return self._parse_many(BillingTermInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BillingTermInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceClosedInvoicesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceClosedInvoicesIdEndpoint.py index 0829f1f69..3d81a4ae4 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceClosedInvoicesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceClosedInvoicesIdEndpoint.py @@ -10,7 +10,9 @@ class FinanceClosedinvoicesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ClosedInvoice: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ClosedInvoice: """ Performs a PUT request against the /finance/closedInvoices/{id} endpoint. @@ -20,9 +22,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ClosedInvoice: The parsed response data. """ - return self._parse_one(ClosedInvoice, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ClosedInvoice, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ClosedInvoice: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ClosedInvoice: """ Performs a PATCH request against the /finance/closedInvoices/{id} endpoint. @@ -32,4 +38,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ClosedInvoice: The parsed response data. """ - return self._parse_one(ClosedInvoice, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ClosedInvoice, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceClosedinvoicesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceClosedinvoicesEndpoint.py index cb95d2577..53be2aad5 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceClosedinvoicesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceClosedinvoicesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceClosedinvoicesIdEndpoint import FinanceClosedinvoicesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceClosedinvoicesIdEndpoint import ( + FinanceClosedinvoicesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceCountEndpoint.py index 97fce646d..87f6cfa6e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceCompanyfinanceCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/companyFinance/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/companyFinance/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceEndpoint.py index dc304a94a..6c5c80509 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceCompanyfinanceCountEndpoint import FinanceCompanyfinanceCountEndpoint -from pyconnectwise.endpoints.manage.FinanceCompanyfinanceIdEndpoint import FinanceCompanyfinanceIdEndpoint +from pyconnectwise.endpoints.manage.FinanceCompanyfinanceCountEndpoint import ( + FinanceCompanyfinanceCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceCompanyfinanceIdEndpoint import ( + FinanceCompanyfinanceIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class FinanceCompanyfinanceEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "companyFinance", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceCompanyfinanceCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceCompanyfinanceCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceCompanyfinanceIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceIdEndpoint.py index b366617e9..b8d540308 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCompanyFinanceIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyFinance: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyFinance: """ Performs a GET request against the /finance/companyFinance/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CompanyFinance: The parsed response data. """ - return self._parse_one(CompanyFinance, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CompanyFinance, + super()._make_request("GET", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CompanyFinance: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CompanyFinance: """ Performs a PATCH request against the /finance/companyFinance/{id} endpoint. @@ -55,4 +62,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CompanyFinance: The parsed response data. """ - return self._parse_one(CompanyFinance, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CompanyFinance, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesCountEndpoint.py index c8a2f8e41..6643784c8 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceCurrenciesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/currencies/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/currencies/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesEndpoint.py index 6b36c18da..cec29b9cc 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceCurrenciesCountEndpoint import FinanceCurrenciesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceCurrenciesIdEndpoint import FinanceCurrenciesIdEndpoint -from pyconnectwise.endpoints.manage.FinanceCurrenciesInfoEndpoint import FinanceCurrenciesInfoEndpoint +from pyconnectwise.endpoints.manage.FinanceCurrenciesCountEndpoint import ( + FinanceCurrenciesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceCurrenciesIdEndpoint import ( + FinanceCurrenciesIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceCurrenciesInfoEndpoint import ( + FinanceCurrenciesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Finance from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class FinanceCurrenciesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "currencies", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceCurrenciesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(FinanceCurrenciesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceCurrenciesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceCurrenciesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceCurrenciesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> FinanceCurrenciesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Finance]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Finance]: """ Performs a GET request against the /finance/currencies endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Finance]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Finance]: """ Performs a GET request against the /finance/currencies endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Finance]: The parsed response data. """ - return self._parse_many(Finance, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Finance, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Finance: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Finance: """ Performs a POST request against the /finance/currencies endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Finance: The parsed response data. """ - return self._parse_one(Finance, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Finance, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdEndpoint.py index 040f4ce84..3f88a8c20 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceCurrenciesIdInfoEndpoint import FinanceCurrenciesIdInfoEndpoint -from pyconnectwise.endpoints.manage.FinanceCurrenciesIdUsagesEndpoint import FinanceCurrenciesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.FinanceCurrenciesIdInfoEndpoint import ( + FinanceCurrenciesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceCurrenciesIdUsagesEndpoint import ( + FinanceCurrenciesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Finance from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class FinanceCurrenciesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceCurrenciesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(FinanceCurrenciesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + FinanceCurrenciesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceCurrenciesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Finance]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Finance]: """ Performs a GET request against the /finance/currencies/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Finance: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Finance: """ Performs a GET request against the /finance/currencies/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> F Returns: Finance: The parsed response data. """ - return self._parse_one(Finance, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Finance, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Finance: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Finance: """ Performs a PUT request against the /finance/currencies/{id} endpoint. @@ -58,9 +74,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> F Returns: Finance: The parsed response data. """ - return self._parse_one(Finance, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Finance, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Finance: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Finance: """ Performs a PATCH request against the /finance/currencies/{id} endpoint. @@ -70,9 +90,13 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Finance: The parsed response data. """ - return self._parse_one(Finance, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Finance, super()._make_request("PATCH", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/currencies/{id} endpoint. @@ -82,4 +106,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdInfoEndpoint.py index 71357e5a5..b8f2c41c7 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CurrencyInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CurrencyInfo: """ Performs a GET request against the /finance/currencies/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CurrencyInfo: The parsed response data. """ - return self._parse_one(CurrencyInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CurrencyInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdUsagesEndpoint.py index c7a5a5883..5b9213d02 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceCurrenciesIdUsagesListEndpoint import FinanceCurrenciesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.FinanceCurrenciesIdUsagesListEndpoint import ( + FinanceCurrenciesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class FinanceCurrenciesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(FinanceCurrenciesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + FinanceCurrenciesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/currencies/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/currencies/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdUsagesListEndpoint.py index bed169606..90bb0879c 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class FinanceCurrenciesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/currencies/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/currencies/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesInfoCountEndpoint.py index cf3b6e705..253125b6d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceCurrenciesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/currencies/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/currencies/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesInfoEndpoint.py index d6348e6bf..6bb80de60 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceCurrenciesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceCurrenciesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceCurrenciesInfoCountEndpoint import FinanceCurrenciesInfoCountEndpoint +from pyconnectwise.endpoints.manage.FinanceCurrenciesInfoCountEndpoint import ( + FinanceCurrenciesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CurrencyInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class FinanceCurrenciesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceCurrenciesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceCurrenciesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CurrencyInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CurrencyInfo]: """ Performs a GET request against the /finance/currencies/info endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CurrencyInfo]: The parsed response data. """ - return self._parse_many(CurrencyInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CurrencyInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsCountEndpoint.py index cef199516..be8189d14 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceDeliverymethodsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/deliveryMethods/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/deliveryMethods/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsEndpoint.py index 97a3529d2..61dfffa91 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceDeliverymethodsCountEndpoint import FinanceDeliverymethodsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceDeliverymethodsIdEndpoint import FinanceDeliverymethodsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceDeliverymethodsCountEndpoint import ( + FinanceDeliverymethodsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceDeliverymethodsIdEndpoint import ( + FinanceDeliverymethodsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DeliveryMethod from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceDeliverymethodsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "deliveryMethods", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceDeliverymethodsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceDeliverymethodsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceDeliverymethodsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DeliveryMethod]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DeliveryMethod]: """ Performs a GET request against the /finance/deliveryMethods endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DeliveryMethod]: The parsed response data. """ - return self._parse_many(DeliveryMethod, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DeliveryMethod, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DeliveryMethod: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DeliveryMethod: """ Performs a POST request against the /finance/deliveryMethods endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: DeliveryMethod: The parsed response data. """ - return self._parse_one(DeliveryMethod, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + DeliveryMethod, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsIdEndpoint.py index 72ea0a51e..32b3d9408 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceDeliveryMethodsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DeliveryMethod: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DeliveryMethod: """ Performs a GET request against the /finance/deliveryMethods/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DeliveryMethod: The parsed response data. """ - return self._parse_one(DeliveryMethod, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DeliveryMethod, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/deliveryMethods/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DeliveryMethod: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DeliveryMethod: """ Performs a PUT request against the /finance/deliveryMethods/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DeliveryMethod: The parsed response data. """ - return self._parse_one(DeliveryMethod, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + DeliveryMethod, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DeliveryMethod: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DeliveryMethod: """ Performs a PATCH request against the /finance/deliveryMethods/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: DeliveryMethod: The parsed response data. """ - return self._parse_one(DeliveryMethod, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + DeliveryMethod, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceEndpoint.py index 3172b28a7..f1da68843 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceEndpoint.py @@ -1,31 +1,77 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingEndpoint import FinanceAccountingEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingpackagesEndpoint import FinanceAccountingpackagesEndpoint -from pyconnectwise.endpoints.manage.FinanceAccountingpackagesetupEndpoint import FinanceAccountingpackagesetupEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementrecapEndpoint import FinanceAgreementrecapEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementsEndpoint import FinanceAgreementsEndpoint -from pyconnectwise.endpoints.manage.FinanceAgreementtypesEndpoint import FinanceAgreementtypesEndpoint -from pyconnectwise.endpoints.manage.FinanceBatchsetupsEndpoint import FinanceBatchsetupsEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingcyclesEndpoint import FinanceBillingcyclesEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingsetupsEndpoint import FinanceBillingsetupsEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingstatusesEndpoint import FinanceBillingstatusesEndpoint -from pyconnectwise.endpoints.manage.FinanceBillingtermsEndpoint import FinanceBillingtermsEndpoint -from pyconnectwise.endpoints.manage.FinanceClosedinvoicesEndpoint import FinanceClosedinvoicesEndpoint -from pyconnectwise.endpoints.manage.FinanceCompanyfinanceEndpoint import FinanceCompanyfinanceEndpoint -from pyconnectwise.endpoints.manage.FinanceCurrenciesEndpoint import FinanceCurrenciesEndpoint -from pyconnectwise.endpoints.manage.FinanceDeliverymethodsEndpoint import FinanceDeliverymethodsEndpoint -from pyconnectwise.endpoints.manage.FinanceGlaccountsEndpoint import FinanceGlaccountsEndpoint -from pyconnectwise.endpoints.manage.FinanceGlcaptionsEndpoint import FinanceGlcaptionsEndpoint +from pyconnectwise.endpoints.manage.FinanceAccountingEndpoint import ( + FinanceAccountingEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingpackagesEndpoint import ( + FinanceAccountingpackagesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAccountingpackagesetupEndpoint import ( + FinanceAccountingpackagesetupEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementrecapEndpoint import ( + FinanceAgreementrecapEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementsEndpoint import ( + FinanceAgreementsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceAgreementtypesEndpoint import ( + FinanceAgreementtypesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBatchsetupsEndpoint import ( + FinanceBatchsetupsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingcyclesEndpoint import ( + FinanceBillingcyclesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingsetupsEndpoint import ( + FinanceBillingsetupsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingstatusesEndpoint import ( + FinanceBillingstatusesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceBillingtermsEndpoint import ( + FinanceBillingtermsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceClosedinvoicesEndpoint import ( + FinanceClosedinvoicesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceCompanyfinanceEndpoint import ( + FinanceCompanyfinanceEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceCurrenciesEndpoint import ( + FinanceCurrenciesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceDeliverymethodsEndpoint import ( + FinanceDeliverymethodsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceGlaccountsEndpoint import ( + FinanceGlaccountsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceGlcaptionsEndpoint import ( + FinanceGlcaptionsEndpoint, +) from pyconnectwise.endpoints.manage.FinanceGlpathsEndpoint import FinanceGlpathsEndpoint from pyconnectwise.endpoints.manage.FinanceInfoEndpoint import FinanceInfoEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesEndpoint import FinanceInvoiceemailtemplatesEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicesEndpoint import FinanceInvoicesEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesEndpoint import FinanceInvoicetemplatesEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesetupsEndpoint import FinanceInvoicetemplatesetupsEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesEndpoint import FinanceTaxcodesEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxintegrationsEndpoint import FinanceTaxintegrationsEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesEndpoint import ( + FinanceInvoiceemailtemplatesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoicesEndpoint import ( + FinanceInvoicesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesEndpoint import ( + FinanceInvoicetemplatesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesetupsEndpoint import ( + FinanceInvoicetemplatesetupsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesEndpoint import ( + FinanceTaxcodesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxintegrationsEndpoint import ( + FinanceTaxintegrationsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -34,50 +80,78 @@ class FinanceEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "finance", parent_endpoint=parent_endpoint) - self.tax_integrations = self._register_child_endpoint( - FinanceTaxintegrationsEndpoint(client, parent_endpoint=self) - ) - self.billing_setups = self._register_child_endpoint(FinanceBillingsetupsEndpoint(client, parent_endpoint=self)) - self.gl_captions = self._register_child_endpoint(FinanceGlcaptionsEndpoint(client, parent_endpoint=self)) - self.agreement_types = self._register_child_endpoint( - FinanceAgreementtypesEndpoint(client, parent_endpoint=self) + self.invoice_email_templates = self._register_child_endpoint( + FinanceInvoiceemailtemplatesEndpoint(client, parent_endpoint=self) ) - self.info = self._register_child_endpoint(FinanceInfoEndpoint(client, parent_endpoint=self)) - self.currencies = self._register_child_endpoint(FinanceCurrenciesEndpoint(client, parent_endpoint=self)) - self.agreements = self._register_child_endpoint(FinanceAgreementsEndpoint(client, parent_endpoint=self)) self.delivery_methods = self._register_child_endpoint( FinanceDeliverymethodsEndpoint(client, parent_endpoint=self) ) + self.company_finance = self._register_child_endpoint( + FinanceCompanyfinanceEndpoint(client, parent_endpoint=self) + ) + self.gl_captions = self._register_child_endpoint( + FinanceGlcaptionsEndpoint(client, parent_endpoint=self) + ) + self.gl_accounts = self._register_child_endpoint( + FinanceGlaccountsEndpoint(client, parent_endpoint=self) + ) + self.batch_setups = self._register_child_endpoint( + FinanceBatchsetupsEndpoint(client, parent_endpoint=self) + ) self.accounting_package_setup = self._register_child_endpoint( FinanceAccountingpackagesetupEndpoint(client, parent_endpoint=self) ) - self.invoice_email_templates = self._register_child_endpoint( - FinanceInvoiceemailtemplatesEndpoint(client, parent_endpoint=self) + self.agreement_types = self._register_child_endpoint( + FinanceAgreementtypesEndpoint(client, parent_endpoint=self) + ) + self.tax_integrations = self._register_child_endpoint( + FinanceTaxintegrationsEndpoint(client, parent_endpoint=self) + ) + self.glpaths = self._register_child_endpoint( + FinanceGlpathsEndpoint(client, parent_endpoint=self) + ) + self.accounting = self._register_child_endpoint( + FinanceAccountingEndpoint(client, parent_endpoint=self) + ) + self.billing_setups = self._register_child_endpoint( + FinanceBillingsetupsEndpoint(client, parent_endpoint=self) + ) + self.currencies = self._register_child_endpoint( + FinanceCurrenciesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceInfoEndpoint(client, parent_endpoint=self) + ) + self.tax_codes = self._register_child_endpoint( + FinanceTaxcodesEndpoint(client, parent_endpoint=self) ) - self.invoices = self._register_child_endpoint(FinanceInvoicesEndpoint(client, parent_endpoint=self)) - self.gl_accounts = self._register_child_endpoint(FinanceGlaccountsEndpoint(client, parent_endpoint=self)) - self.agreementrecap = self._register_child_endpoint(FinanceAgreementrecapEndpoint(client, parent_endpoint=self)) self.closed_invoices = self._register_child_endpoint( FinanceClosedinvoicesEndpoint(client, parent_endpoint=self) ) - self.company_finance = self._register_child_endpoint( - FinanceCompanyfinanceEndpoint(client, parent_endpoint=self) + self.billing_cycles = self._register_child_endpoint( + FinanceBillingcyclesEndpoint(client, parent_endpoint=self) + ) + self.agreementrecap = self._register_child_endpoint( + FinanceAgreementrecapEndpoint(client, parent_endpoint=self) ) self.invoice_template_setups = self._register_child_endpoint( FinanceInvoicetemplatesetupsEndpoint(client, parent_endpoint=self) ) - self.batch_setups = self._register_child_endpoint(FinanceBatchsetupsEndpoint(client, parent_endpoint=self)) - self.billing_terms = self._register_child_endpoint(FinanceBillingtermsEndpoint(client, parent_endpoint=self)) self.billing_statuses = self._register_child_endpoint( FinanceBillingstatusesEndpoint(client, parent_endpoint=self) ) + self.billing_terms = self._register_child_endpoint( + FinanceBillingtermsEndpoint(client, parent_endpoint=self) + ) + self.agreements = self._register_child_endpoint( + FinanceAgreementsEndpoint(client, parent_endpoint=self) + ) + self.invoices = self._register_child_endpoint( + FinanceInvoicesEndpoint(client, parent_endpoint=self) + ) self.invoice_templates = self._register_child_endpoint( FinanceInvoicetemplatesEndpoint(client, parent_endpoint=self) ) - self.accounting = self._register_child_endpoint(FinanceAccountingEndpoint(client, parent_endpoint=self)) - self.glpaths = self._register_child_endpoint(FinanceGlpathsEndpoint(client, parent_endpoint=self)) self.accounting_packages = self._register_child_endpoint( FinanceAccountingpackagesEndpoint(client, parent_endpoint=self) ) - self.tax_codes = self._register_child_endpoint(FinanceTaxcodesEndpoint(client, parent_endpoint=self)) - self.billing_cycles = self._register_child_endpoint(FinanceBillingcyclesEndpoint(client, parent_endpoint=self)) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsCountEndpoint.py index dee19ae63..4ab901cf7 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceGlaccountsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/glAccounts/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/glAccounts/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsEndpoint.py index 53fea2fc7..204f6eaaa 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceGlaccountsCountEndpoint import FinanceGlaccountsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceGlaccountsIdEndpoint import FinanceGlaccountsIdEndpoint -from pyconnectwise.endpoints.manage.FinanceGlaccountsMappedtypesEndpoint import FinanceGlaccountsMappedtypesEndpoint +from pyconnectwise.endpoints.manage.FinanceGlaccountsCountEndpoint import ( + FinanceGlaccountsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceGlaccountsIdEndpoint import ( + FinanceGlaccountsIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceGlaccountsMappedtypesEndpoint import ( + FinanceGlaccountsMappedtypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import GLAccount from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +19,9 @@ class FinanceGlaccountsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "glAccounts", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceGlaccountsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceGlaccountsCountEndpoint(client, parent_endpoint=self) + ) self.mapped_types = self._register_child_endpoint( FinanceGlaccountsMappedtypesEndpoint(client, parent_endpoint=self) ) @@ -31,7 +39,9 @@ def id(self, id: int) -> FinanceGlaccountsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[GLAccount]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[GLAccount]: """ Performs a GET request against the /finance/glAccounts endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[GLAccount]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[GLAccount]: """ Performs a GET request against the /finance/glAccounts endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[GLAccount]: The parsed response data. """ - return self._parse_many(GLAccount, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + GLAccount, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLAccount: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLAccount: """ Performs a POST request against the /finance/glAccounts endpoint. @@ -74,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GLAccount: The parsed response data. """ - return self._parse_one(GLAccount, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GLAccount, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsIdEndpoint.py index 6c9070f6f..857737300 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsIdEndpoint.py @@ -10,7 +10,9 @@ class FinanceGlaccountsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[GLAccount]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[GLAccount]: """ Performs a GET request against the /finance/glAccounts/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLAccount: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLAccount: """ Performs a GET request against the /finance/glAccounts/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GLAccount: The parsed response data. """ - return self._parse_one(GLAccount, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GLAccount, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLAccount: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLAccount: """ Performs a PUT request against the /finance/glAccounts/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GLAccount: The parsed response data. """ - return self._parse_one(GLAccount, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + GLAccount, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLAccount: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLAccount: """ Performs a PATCH request against the /finance/glAccounts/{id} endpoint. @@ -65,9 +77,13 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GLAccount: The parsed response data. """ - return self._parse_one(GLAccount, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + GLAccount, super()._make_request("PATCH", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/glAccounts/{id} endpoint. @@ -77,4 +93,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsMappedTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsMappedTypesCountEndpoint.py index a67f49ace..758319510 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsMappedTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsMappedTypesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceGlaccountsMappedtypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/glAccounts/mappedTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/glAccounts/mappedTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsMappedTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsMappedTypesEndpoint.py index d766fd6ce..8d193852b 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlAccountsMappedTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlAccountsMappedTypesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceGlaccountsMappedtypesCountEndpoint import \ - FinanceGlaccountsMappedtypesCountEndpoint +from pyconnectwise.endpoints.manage.FinanceGlaccountsMappedtypesCountEndpoint import ( + FinanceGlaccountsMappedtypesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MappedType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): FinanceGlaccountsMappedtypesCountEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MappedType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MappedType]: """ Performs a GET request against the /finance/glAccounts/mappedTypes endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MappedType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MappedType]: """ Performs a GET request against the /finance/glAccounts/mappedTypes endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MappedType]: The parsed response data. """ - return self._parse_many(MappedType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MappedType, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsCountEndpoint.py index ad2e1bece..4c66ad7bd 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceGlcaptionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/glCaptions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/glCaptions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsEndpoint.py index 0c1935717..21a32d907 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceGlcaptionsCountEndpoint import FinanceGlcaptionsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceGlcaptionsIdEndpoint import FinanceGlcaptionsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceGlcaptionsCountEndpoint import ( + FinanceGlcaptionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceGlcaptionsIdEndpoint import ( + FinanceGlcaptionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import GLCaption from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceGlcaptionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "glCaptions", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceGlcaptionsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceGlcaptionsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceGlcaptionsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> FinanceGlcaptionsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[GLCaption]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[GLCaption]: """ Performs a GET request against the /finance/glCaptions endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[GLCaption]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[GLCaption]: """ Performs a GET request against the /finance/glCaptions endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[GLCaption]: The parsed response data. """ - return self._parse_many(GLCaption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + GLCaption, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsIdEndpoint.py index 5ebffb9cc..30a4be908 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlCaptionsIdEndpoint.py @@ -10,7 +10,9 @@ class FinanceGlcaptionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[GLCaption]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[GLCaption]: """ Performs a GET request against the /finance/glCaptions/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLCaption: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLCaption: """ Performs a GET request against the /finance/glCaptions/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GLCaption: The parsed response data. """ - return self._parse_one(GLCaption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GLCaption, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLCaption: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLCaption: """ Performs a PUT request against the /finance/glCaptions/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GLCaption: The parsed response data. """ - return self._parse_one(GLCaption, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + GLCaption, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLCaption: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLCaption: """ Performs a PATCH request against the /finance/glCaptions/{id} endpoint. @@ -65,4 +77,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GLCaption: The parsed response data. """ - return self._parse_one(GLCaption, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + GLCaption, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlpathsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlpathsCountEndpoint.py index c72b083df..1d55d5a6f 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlpathsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlpathsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceGlpathsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/glpaths/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/glpaths/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlpathsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlpathsEndpoint.py index 3f0aa555e..69fbbc4d6 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlpathsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlpathsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceGlpathsCountEndpoint import FinanceGlpathsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceGlpathsIdEndpoint import FinanceGlpathsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceGlpathsCountEndpoint import ( + FinanceGlpathsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceGlpathsIdEndpoint import ( + FinanceGlpathsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import GLPath from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceGlpathsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "glpaths", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceGlpathsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceGlpathsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceGlpathsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> FinanceGlpathsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[GLPath]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[GLPath]: """ Performs a GET request against the /finance/glpaths endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[GLPath]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[GLPath]: """ Performs a GET request against the /finance/glpaths endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[GLPath]: The parsed response data. """ - return self._parse_many(GLPath, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + GLPath, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLPath: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLPath: """ Performs a POST request against the /finance/glpaths endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GLPath: The parsed response data. """ - return self._parse_one(GLPath, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GLPath, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceGlpathsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceGlpathsIdEndpoint.py index 4c37a9924..fdf101a53 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceGlpathsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceGlpathsIdEndpoint.py @@ -10,7 +10,9 @@ class FinanceGlpathsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[GLPath]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[GLPath]: """ Performs a GET request against the /finance/glpaths/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLPath: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLPath: """ Performs a GET request against the /finance/glpaths/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GLPath: The parsed response data. """ - return self._parse_one(GLPath, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GLPath, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/glpaths/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLPath: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLPath: """ Performs a PUT request against the /finance/glpaths/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GLPath: The parsed response data. """ - return self._parse_one(GLPath, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + GLPath, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GLPath: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GLPath: """ Performs a PATCH request against the /finance/glpaths/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GLPath: The parsed response data. """ - return self._parse_one(GLPath, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + GLPath, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesCountEndpoint.py index c75bb47a5..d6a62de14 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceInfoCurrencycodesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/info/currencyCodes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/info/currencyCodes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesEndpoint.py index c1a013e86..6679845b1 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInfoCurrencycodesCountEndpoint import FinanceInfoCurrencycodesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceInfoCurrencycodesIdEndpoint import FinanceInfoCurrencycodesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceInfoCurrencycodesCountEndpoint import ( + FinanceInfoCurrencycodesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInfoCurrencycodesIdEndpoint import ( + FinanceInfoCurrencycodesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CurrencyCode from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceInfoCurrencycodesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "currencyCodes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceInfoCurrencycodesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceInfoCurrencycodesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceInfoCurrencycodesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CurrencyCode]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CurrencyCode]: """ Performs a GET request against the /finance/info/currencyCodes endpoint. @@ -60,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CurrencyCode]: The parsed response data. """ - return self._parse_many(CurrencyCode, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CurrencyCode, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesIdEndpoint.py index 35e4610c5..a4d08ab4a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInfoCurrencyCodesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CurrencyCode: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CurrencyCode: """ Performs a GET request against the /finance/info/currencyCodes/{id} endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CurrencyCode: The parsed response data. """ - return self._parse_one(CurrencyCode, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CurrencyCode, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInfoEndpoint.py index e47ac682f..8b612df23 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInfoEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInfoCurrencycodesEndpoint import FinanceInfoCurrencycodesEndpoint -from pyconnectwise.endpoints.manage.FinanceInfoInvoiceEndpoint import FinanceInfoInvoiceEndpoint -from pyconnectwise.endpoints.manage.FinanceInfoTaxintegrationsEndpoint import FinanceInfoTaxintegrationsEndpoint +from pyconnectwise.endpoints.manage.FinanceInfoCurrencycodesEndpoint import ( + FinanceInfoCurrencycodesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInfoInvoiceEndpoint import ( + FinanceInfoInvoiceEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInfoTaxintegrationsEndpoint import ( + FinanceInfoTaxintegrationsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +18,12 @@ class FinanceInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.invoice = self._register_child_endpoint(FinanceInfoInvoiceEndpoint(client, parent_endpoint=self)) self.tax_integrations = self._register_child_endpoint( FinanceInfoTaxintegrationsEndpoint(client, parent_endpoint=self) ) self.currency_codes = self._register_child_endpoint( FinanceInfoCurrencycodesEndpoint(client, parent_endpoint=self) ) + self.invoice = self._register_child_endpoint( + FinanceInfoInvoiceEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInfoInvoiceEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInfoInvoiceEndpoint.py index 9caefc505..bf5414593 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInfoInvoiceEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInfoInvoiceEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInfoInvoiceIdEndpoint import FinanceInfoInvoiceIdEndpoint +from pyconnectwise.endpoints.manage.FinanceInfoInvoiceIdEndpoint import ( + FinanceInfoInvoiceIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/FinanceInfoInvoiceIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInfoInvoiceIdEndpoint.py index 8a2ad0693..1613c8b31 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInfoInvoiceIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInfoInvoiceIdEndpoint.py @@ -10,7 +10,9 @@ class FinanceInfoInvoiceIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[InvoiceInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[InvoiceInfo]: """ Performs a GET request against the /finance/info/invoice/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceInfo: """ Performs a GET request against the /finance/info/invoice/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InvoiceInfo: The parsed response data. """ - return self._parse_one(InvoiceInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InvoiceInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsCountEndpoint.py index 5586cb46d..621696948 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceInfoTaxintegrationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/info/taxIntegrations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/info/taxIntegrations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsEndpoint.py index c9456cd42..6cd9586bb 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInfoTaxintegrationsCountEndpoint import \ - FinanceInfoTaxintegrationsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceInfoTaxintegrationsIdEndpoint import FinanceInfoTaxintegrationsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceInfoTaxintegrationsCountEndpoint import ( + FinanceInfoTaxintegrationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInfoTaxintegrationsIdEndpoint import ( + FinanceInfoTaxintegrationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxIntegrationInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxIntegrationInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxIntegrationInfo]: """ Performs a GET request against the /finance/info/taxIntegrations endpoint. @@ -63,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxIntegrationInfo]: The parsed response data. """ - return self._parse_many(TaxIntegrationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxIntegrationInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsIdEndpoint.py index 3a663bbe9..07d10bae0 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInfoTaxIntegrationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxIntegrationInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxIntegrationInfo: """ Performs a GET request against the /finance/info/taxIntegrations/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxIntegrationInfo: The parsed response data. """ - return self._parse_one(TaxIntegrationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxIntegrationInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesCountEndpoint.py index 211a0b3c0..78fea5116 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceInvoiceemailtemplatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/invoiceEmailTemplates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/invoiceEmailTemplates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesEndpoint.py index 12fa93b30..eb6556762 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesEndpoint.py @@ -1,11 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesCountEndpoint import \ - FinanceInvoiceemailtemplatesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesIdEndpoint import FinanceInvoiceemailtemplatesIdEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesInfoEndpoint import \ - FinanceInvoiceemailtemplatesInfoEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesCountEndpoint import ( + FinanceInvoiceemailtemplatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesIdEndpoint import ( + FinanceInvoiceemailtemplatesIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesInfoEndpoint import ( + FinanceInvoiceemailtemplatesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InvoiceEmailTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,14 +17,16 @@ class FinanceInvoiceemailtemplatesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "invoiceEmailTemplates", parent_endpoint=parent_endpoint) - - self.info = self._register_child_endpoint( - FinanceInvoiceemailtemplatesInfoEndpoint(client, parent_endpoint=self) + super().__init__( + client, "invoiceEmailTemplates", parent_endpoint=parent_endpoint ) + self.count = self._register_child_endpoint( FinanceInvoiceemailtemplatesCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + FinanceInvoiceemailtemplatesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceInvoiceemailtemplatesIdEndpoint: """ @@ -31,7 +37,9 @@ def id(self, id: int) -> FinanceInvoiceemailtemplatesIdEndpoint: Returns: FinanceInvoiceemailtemplatesIdEndpoint: The initialized FinanceInvoiceemailtemplatesIdEndpoint object. """ - child = FinanceInvoiceemailtemplatesIdEndpoint(self.client, parent_endpoint=self) + child = FinanceInvoiceemailtemplatesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -58,7 +66,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[InvoiceEmailTemplate]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[InvoiceEmailTemplate]: """ Performs a GET request against the /finance/invoiceEmailTemplates endpoint. @@ -68,9 +78,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[InvoiceEmailTemplate]: The parsed response data. """ - return self._parse_many(InvoiceEmailTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + InvoiceEmailTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceEmailTemplate: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceEmailTemplate: """ Performs a POST request against the /finance/invoiceEmailTemplates endpoint. @@ -80,4 +95,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InvoiceEmailTemplate: The parsed response data. """ - return self._parse_one(InvoiceEmailTemplate, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + InvoiceEmailTemplate, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdEndpoint.py index ff029ec72..b7cfbe9a1 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesIdInfoEndpoint import \ - FinanceInvoiceemailtemplatesIdInfoEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesIdUsagesEndpoint import \ - FinanceInvoiceemailtemplatesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesIdInfoEndpoint import ( + FinanceInvoiceemailtemplatesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesIdUsagesEndpoint import ( + FinanceInvoiceemailtemplatesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InvoiceEmailTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,12 +16,12 @@ class FinanceInvoiceemailtemplatesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - FinanceInvoiceemailtemplatesIdInfoEndpoint(client, parent_endpoint=self) - ) self.usages = self._register_child_endpoint( FinanceInvoiceemailtemplatesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + FinanceInvoiceemailtemplatesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -44,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceEmailTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceEmailTemplate: """ Performs a GET request against the /finance/invoiceEmailTemplates/{id} endpoint. @@ -54,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InvoiceEmailTemplate: The parsed response data. """ - return self._parse_one(InvoiceEmailTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InvoiceEmailTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/invoiceEmailTemplates/{id} endpoint. @@ -66,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceEmailTemplate: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceEmailTemplate: """ Performs a PUT request against the /finance/invoiceEmailTemplates/{id} endpoint. @@ -78,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InvoiceEmailTemplate: The parsed response data. """ - return self._parse_one(InvoiceEmailTemplate, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + InvoiceEmailTemplate, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceEmailTemplate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceEmailTemplate: """ Performs a PATCH request against the /finance/invoiceEmailTemplates/{id} endpoint. @@ -90,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InvoiceEmailTemplate: The parsed response data. """ - return self._parse_one(InvoiceEmailTemplate, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + InvoiceEmailTemplate, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdInfoEndpoint.py index 719eb6a1d..a6a8a455e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceEmailTemplateInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceEmailTemplateInfo: """ Performs a GET request against the /finance/invoiceEmailTemplates/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InvoiceEmailTemplateInfo: The parsed response data. """ - return self._parse_one(InvoiceEmailTemplateInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InvoiceEmailTemplateInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdUsagesEndpoint.py index ad2c684a0..594c45286 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesIdUsagesListEndpoint import \ - FinanceInvoiceemailtemplatesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesIdUsagesListEndpoint import ( + FinanceInvoiceemailtemplatesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +14,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) self.list = self._register_child_endpoint( - FinanceInvoiceemailtemplatesIdUsagesListEndpoint(client, parent_endpoint=self) + FinanceInvoiceemailtemplatesIdUsagesListEndpoint( + client, parent_endpoint=self + ) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/invoiceEmailTemplates/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +42,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/invoiceEmailTemplates/{id}/usages endpoint. @@ -47,4 +54,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdUsagesListEndpoint.py index 061fbbfbf..0df7c9ee1 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class FinanceInvoiceemailtemplatesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/invoiceEmailTemplates/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/invoiceEmailTemplates/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesInfoCountEndpoint.py index 930e83b24..e30ab13ba 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceInvoiceemailtemplatesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/invoiceEmailTemplates/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/invoiceEmailTemplates/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesInfoEndpoint.py index 68699eeb5..a765486a6 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceEmailTemplatesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesInfoCountEndpoint import \ - FinanceInvoiceemailtemplatesInfoCountEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoiceemailtemplatesInfoCountEndpoint import ( + FinanceInvoiceemailtemplatesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InvoiceEmailTemplateInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[InvoiceEmailTemplateInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[InvoiceEmailTemplateInfo]: """ Performs a GET request against the /finance/invoiceEmailTemplates/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[InvoiceEmailTemplateInfo]: The parsed response data. """ - return self._parse_many(InvoiceEmailTemplateInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + InvoiceEmailTemplateInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsCountEndpoint.py index 17d88c0f6..567ba22d2 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceInvoicetemplatesetupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/invoiceTemplateSetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/invoiceTemplateSetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsEndpoint.py index b1154be37..591270e70 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesetupsCountEndpoint import \ - FinanceInvoicetemplatesetupsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesetupsIdEndpoint import FinanceInvoicetemplatesetupsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesetupsCountEndpoint import ( + FinanceInvoicetemplatesetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesetupsIdEndpoint import ( + FinanceInvoicetemplatesetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InvoiceTemplateSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +14,9 @@ class FinanceInvoicetemplatesetupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "invoiceTemplateSetups", parent_endpoint=parent_endpoint) + super().__init__( + client, "invoiceTemplateSetups", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( FinanceInvoicetemplatesetupsCountEndpoint(client, parent_endpoint=self) @@ -26,7 +31,9 @@ def id(self, id: int) -> FinanceInvoicetemplatesetupsIdEndpoint: Returns: FinanceInvoicetemplatesetupsIdEndpoint: The initialized FinanceInvoicetemplatesetupsIdEndpoint object. """ - child = FinanceInvoicetemplatesetupsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceInvoicetemplatesetupsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[InvoiceTemplateSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[InvoiceTemplateSetup]: """ Performs a GET request against the /finance/invoiceTemplateSetups endpoint. @@ -63,4 +72,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[InvoiceTemplateSetup]: The parsed response data. """ - return self._parse_many(InvoiceTemplateSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + InvoiceTemplateSetup, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsIdEndpoint.py index e9f1f8d7f..55a3d850d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplateSetupsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceTemplateSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceTemplateSetup: """ Performs a GET request against the /finance/invoiceTemplateSetups/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InvoiceTemplateSetup: The parsed response data. """ - return self._parse_one(InvoiceTemplateSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InvoiceTemplateSetup, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesCountEndpoint.py index a4b7a2080..ab2c93685 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceInvoicetemplatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/invoiceTemplates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/invoiceTemplates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesEndpoint.py index c70733686..20a9dc098 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesCountEndpoint import FinanceInvoicetemplatesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesIdEndpoint import FinanceInvoicetemplatesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesCountEndpoint import ( + FinanceInvoicetemplatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesIdEndpoint import ( + FinanceInvoicetemplatesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InvoiceTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceInvoicetemplatesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "invoiceTemplates", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceInvoicetemplatesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceInvoicetemplatesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceInvoicetemplatesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[InvoiceTemplate]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[InvoiceTemplate]: """ Performs a GET request against the /finance/invoiceTemplates endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[InvoiceTemplate]: The parsed response data. """ - return self._parse_many(InvoiceTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + InvoiceTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceTemplate: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceTemplate: """ Performs a POST request against the /finance/invoiceTemplates endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InvoiceTemplate: The parsed response data. """ - return self._parse_one(InvoiceTemplate, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + InvoiceTemplate, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdEndpoint.py index 9210d3ec5..d36970118 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesIdUsagesEndpoint import \ - FinanceInvoicetemplatesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesIdUsagesEndpoint import ( + FinanceInvoicetemplatesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InvoiceTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceTemplate: """ Performs a GET request against the /finance/invoiceTemplates/{id} endpoint. @@ -49,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InvoiceTemplate: The parsed response data. """ - return self._parse_one(InvoiceTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InvoiceTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceTemplate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceTemplate: """ Performs a PATCH request against the /finance/invoiceTemplates/{id} endpoint. @@ -61,9 +69,14 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InvoiceTemplate: The parsed response data. """ - return self._parse_one(InvoiceTemplate, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + InvoiceTemplate, + super()._make_request("PATCH", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoiceTemplate: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoiceTemplate: """ Performs a PUT request against the /finance/invoiceTemplates/{id} endpoint. @@ -73,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InvoiceTemplate: The parsed response data. """ - return self._parse_one(InvoiceTemplate, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + InvoiceTemplate, + super()._make_request("PUT", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/invoiceTemplates/{id} endpoint. @@ -85,4 +103,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdUsagesEndpoint.py index 06b1559d0..927d66d46 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesIdUsagesListEndpoint import \ - FinanceInvoicetemplatesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoicetemplatesIdUsagesListEndpoint import ( + FinanceInvoicetemplatesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): FinanceInvoicetemplatesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/invoiceTemplates/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/invoiceTemplates/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdUsagesListEndpoint.py index a59085d9d..1e163733a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoiceTemplatesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class FinanceInvoicetemplatesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/invoiceTemplates/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/invoiceTemplates/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoicesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoicesCountEndpoint.py index 9986d4e06..49400192c 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoicesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoicesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceInvoicesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/invoices/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/invoices/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoicesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoicesEndpoint.py index e606a42cd..8d0c1b5ca 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoicesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoicesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicesCountEndpoint import FinanceInvoicesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicesIdEndpoint import FinanceInvoicesIdEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoicesCountEndpoint import ( + FinanceInvoicesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoicesIdEndpoint import ( + FinanceInvoicesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Invoice from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceInvoicesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "invoices", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceInvoicesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceInvoicesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceInvoicesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> FinanceInvoicesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Invoice]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Invoice]: """ Performs a GET request against the /finance/invoices endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Invoice]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Invoice]: """ Performs a GET request against the /finance/invoices endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Invoice]: The parsed response data. """ - return self._parse_many(Invoice, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Invoice, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Invoice: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Invoice: """ Performs a POST request against the /finance/invoices endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Invoice: The parsed response data. """ - return self._parse_one(Invoice, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Invoice, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdEndpoint.py index 961aab052..48026da69 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicesIdPaymentsEndpoint import FinanceInvoicesIdPaymentsEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicesIdPdfEndpoint import FinanceInvoicesIdPdfEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoicesIdPaymentsEndpoint import ( + FinanceInvoicesIdPaymentsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceInvoicesIdPdfEndpoint import ( + FinanceInvoicesIdPdfEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Invoice from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class FinanceInvoicesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.pdf = self._register_child_endpoint(FinanceInvoicesIdPdfEndpoint(client, parent_endpoint=self)) - self.payments = self._register_child_endpoint(FinanceInvoicesIdPaymentsEndpoint(client, parent_endpoint=self)) + self.payments = self._register_child_endpoint( + FinanceInvoicesIdPaymentsEndpoint(client, parent_endpoint=self) + ) + self.pdf = self._register_child_endpoint( + FinanceInvoicesIdPdfEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Invoice]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Invoice]: """ Performs a GET request against the /finance/invoices/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Invoice: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Invoice: """ Performs a GET request against the /finance/invoices/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: Invoice: The parsed response data. """ - return self._parse_one(Invoice, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Invoice, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/invoices/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Invoice: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Invoice: """ Performs a PUT request against the /finance/invoices/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: Invoice: The parsed response data. """ - return self._parse_one(Invoice, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Invoice, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Invoice: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Invoice: """ Performs a PATCH request against the /finance/invoices/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Invoice: The parsed response data. """ - return self._parse_one(Invoice, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Invoice, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPaymentsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPaymentsEndpoint.py index 36d066ce9..c3e7f6dff 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPaymentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPaymentsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceInvoicesIdPaymentsIdEndpoint import FinanceInvoicesIdPaymentsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceInvoicesIdPaymentsIdEndpoint import ( + FinanceInvoicesIdPaymentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InvoicePayment from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -47,7 +49,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[InvoicePayment]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[InvoicePayment]: """ Performs a GET request against the /finance/invoices/{id}/payments endpoint. @@ -57,9 +61,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[InvoicePayment]: The parsed response data. """ - return self._parse_many(InvoicePayment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + InvoicePayment, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoicePayment: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoicePayment: """ Performs a POST request against the /finance/invoices/{id}/payments endpoint. @@ -69,4 +78,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InvoicePayment: The parsed response data. """ - return self._parse_one(InvoicePayment, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + InvoicePayment, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPaymentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPaymentsIdEndpoint.py index 746a2691e..a7db6187d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPaymentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPaymentsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoicePayment: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoicePayment: """ Performs a GET request against the /finance/invoices/{id}/payments/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InvoicePayment: The parsed response data. """ - return self._parse_one(InvoicePayment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InvoicePayment, + super()._make_request("GET", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoicePayment: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoicePayment: """ Performs a PATCH request against the /finance/invoices/{id}/payments/{id} endpoint. @@ -55,9 +62,14 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InvoicePayment: The parsed response data. """ - return self._parse_one(InvoicePayment, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + InvoicePayment, + super()._make_request("PATCH", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InvoicePayment: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InvoicePayment: """ Performs a PUT request against the /finance/invoices/{id}/payments/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InvoicePayment: The parsed response data. """ - return self._parse_one(InvoicePayment, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + InvoicePayment, + super()._make_request("PUT", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/invoices/{id}/payments/{id} endpoint. @@ -79,4 +96,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPdfEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPdfEndpoint.py index 4c51f19fb..c76651669 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPdfEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceInvoicesIdPdfEndpoint.py @@ -9,7 +9,9 @@ class FinanceInvoicesIdPdfEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "pdf", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a GET request against the /finance/invoices/{id}/pdf endpoint. @@ -19,4 +21,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesCountEndpoint.py index 572468184..6899fc0c3 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesEndpoint.py index 5c84bf184..bb8afdc70 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesCountEndpoint import FinanceTaxcodesCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdEndpoint import FinanceTaxcodesIdEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesInfoEndpoint import FinanceTaxcodesInfoEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesCountEndpoint import ( + FinanceTaxcodesCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdEndpoint import ( + FinanceTaxcodesIdEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesInfoEndpoint import ( + FinanceTaxcodesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxCode from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class FinanceTaxcodesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "taxCodes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceTaxcodesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(FinanceTaxcodesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceTaxcodesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + FinanceTaxcodesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceTaxcodesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> FinanceTaxcodesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TaxCode]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TaxCode]: """ Performs a GET request against the /finance/taxCodes endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxCode]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxCode]: """ Performs a GET request against the /finance/taxCodes endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxCode]: The parsed response data. """ - return self._parse_many(TaxCode, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxCode, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCode: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCode: """ Performs a POST request against the /finance/taxCodes endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxCode: The parsed response data. """ - return self._parse_one(TaxCode, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TaxCode, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdCopyEndpoint.py index bf7c1f936..beccc7f0a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdCopyEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesIdCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCode: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCode: """ Performs a POST request against the /finance/taxCodes/{id}/copy endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxCode: The parsed response data. """ - return self._parse_one(TaxCode, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TaxCode, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdEndpoint.py index 787cb8774..51604d72b 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdEndpoint.py @@ -1,17 +1,30 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdCopyEndpoint import FinanceTaxcodesIdCopyEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsEndpoint import \ - FinanceTaxcodesIdExpensetypeexemptionsEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdInfoEndpoint import FinanceTaxcodesIdInfoEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsEndpoint import \ - FinanceTaxcodesIdProducttypeexemptionsEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodelevelsEndpoint import FinanceTaxcodesIdTaxcodelevelsEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsEndpoint import FinanceTaxcodesIdTaxcodexrefsEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdUsagesEndpoint import FinanceTaxcodesIdUsagesEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsEndpoint import \ - FinanceTaxcodesIdWorkroleexemptionsEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdCopyEndpoint import ( + FinanceTaxcodesIdCopyEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsEndpoint import ( + FinanceTaxcodesIdExpensetypeexemptionsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdInfoEndpoint import ( + FinanceTaxcodesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsEndpoint import ( + FinanceTaxcodesIdProducttypeexemptionsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodelevelsEndpoint import ( + FinanceTaxcodesIdTaxcodelevelsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsEndpoint import ( + FinanceTaxcodesIdTaxcodexrefsEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdUsagesEndpoint import ( + FinanceTaxcodesIdUsagesEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsEndpoint import ( + FinanceTaxcodesIdWorkroleexemptionsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxCode from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,26 +34,34 @@ class FinanceTaxcodesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(FinanceTaxcodesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + FinanceTaxcodesIdInfoEndpoint(client, parent_endpoint=self) + ) self.expense_type_exemptions = self._register_child_endpoint( FinanceTaxcodesIdExpensetypeexemptionsEndpoint(client, parent_endpoint=self) ) - self.tax_code_levels = self._register_child_endpoint( - FinanceTaxcodesIdTaxcodelevelsEndpoint(client, parent_endpoint=self) + self.copy = self._register_child_endpoint( + FinanceTaxcodesIdCopyEndpoint(client, parent_endpoint=self) ) - self.usages = self._register_child_endpoint(FinanceTaxcodesIdUsagesEndpoint(client, parent_endpoint=self)) - self.tax_code_x_refs = self._register_child_endpoint( - FinanceTaxcodesIdTaxcodexrefsEndpoint(client, parent_endpoint=self) + self.usages = self._register_child_endpoint( + FinanceTaxcodesIdUsagesEndpoint(client, parent_endpoint=self) ) self.work_role_exemptions = self._register_child_endpoint( FinanceTaxcodesIdWorkroleexemptionsEndpoint(client, parent_endpoint=self) ) - self.copy = self._register_child_endpoint(FinanceTaxcodesIdCopyEndpoint(client, parent_endpoint=self)) + self.tax_code_levels = self._register_child_endpoint( + FinanceTaxcodesIdTaxcodelevelsEndpoint(client, parent_endpoint=self) + ) self.product_type_exemptions = self._register_child_endpoint( FinanceTaxcodesIdProducttypeexemptionsEndpoint(client, parent_endpoint=self) ) + self.tax_code_x_refs = self._register_child_endpoint( + FinanceTaxcodesIdTaxcodexrefsEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TaxCode]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TaxCode]: """ Performs a GET request against the /finance/taxCodes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -61,7 +82,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCode: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCode: """ Performs a GET request against the /finance/taxCodes/{id} endpoint. @@ -71,9 +94,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxCode: The parsed response data. """ - return self._parse_one(TaxCode, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxCode, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id} endpoint. @@ -83,9 +110,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCode: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCode: """ Performs a PUT request against the /finance/taxCodes/{id} endpoint. @@ -95,9 +127,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxCode: The parsed response data. """ - return self._parse_one(TaxCode, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TaxCode, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCode: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCode: """ Performs a PATCH request against the /finance/taxCodes/{id} endpoint. @@ -107,4 +143,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxCode: The parsed response data. """ - return self._parse_one(TaxCode, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TaxCode, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsCountEndpoint.py index 4d0489750..6a5722578 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesIdExpensetypeexemptionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/{id}/expenseTypeExemptions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/{id}/expenseTypeExemptions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsEndpoint.py index 3cbfb3f9d..ce77ff400 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsCountEndpoint import \ - FinanceTaxcodesIdExpensetypeexemptionsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint import \ - FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsCountEndpoint import ( + FinanceTaxcodesIdExpensetypeexemptionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint import ( + FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseTypeExemption from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class FinanceTaxcodesIdExpensetypeexemptionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "expenseTypeExemptions", parent_endpoint=parent_endpoint) + super().__init__( + client, "expenseTypeExemptions", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - FinanceTaxcodesIdExpensetypeexemptionsCountEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdExpensetypeexemptionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint: Returns: FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint: The initialized FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint object. """ - child = FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceTaxcodesIdExpensetypeexemptionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ExpenseTypeExemption]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ExpenseTypeExemption]: """ Performs a GET request against the /finance/taxCodes/{id}/expenseTypeExemptions endpoint. @@ -64,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ExpenseTypeExemption]: The parsed response data. """ - return self._parse_many(ExpenseTypeExemption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ExpenseTypeExemption, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseTypeExemption: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseTypeExemption: """ Performs a POST request against the /finance/taxCodes/{id}/expenseTypeExemptions endpoint. @@ -76,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ExpenseTypeExemption: The parsed response data. """ - return self._parse_one(ExpenseTypeExemption, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ExpenseTypeExemption, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdEndpoint.py index 09a7e58e0..14fe3cb50 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsEndpoint import \ - FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsEndpoint import ( + FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ExpenseTypeExemption from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.taxable_expense_type_levels = self._register_child_endpoint( - FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseTypeExemption: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseTypeExemption: """ Performs a GET request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseTypeExemption: The parsed response data. """ - return self._parse_one(ExpenseTypeExemption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ExpenseTypeExemption, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id} endpoint. @@ -61,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseTypeExemption: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseTypeExemption: """ Performs a PUT request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id} endpoint. @@ -73,9 +88,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: ExpenseTypeExemption: The parsed response data. """ - return self._parse_one(ExpenseTypeExemption, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ExpenseTypeExemption, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ExpenseTypeExemption: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ExpenseTypeExemption: """ Performs a PATCH request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id} endpoint. @@ -85,4 +105,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ExpenseTypeExemption: The parsed response data. """ - return self._parse_one(ExpenseTypeExemption, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ExpenseTypeExemption, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsCountEndpoint.py index 206b6ba8f..59fec4b67 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsCountEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id}/taxableExpenseTypeLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id}/taxableExpenseTypeLevels/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsEndpoint.py index 2653b6fcc..8ef65df16 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsEndpoint.py @@ -1,24 +1,34 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsCountEndpoint import \ - FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint import \ - FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsCountEndpoint import ( + FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint import ( + FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxableExpenseTypeLevel from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "taxableExpenseTypeLevels", parent_endpoint=parent_endpoint) + super().__init__( + client, "taxableExpenseTypeLevels", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsCountEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsCountEndpoint( + client, parent_endpoint=self + ) ) - def id(self, id: int) -> FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint: + def id( + self, id: int + ) -> FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint: """ Sets the ID for this endpoint and returns an initialized FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint object to move down the chain. @@ -27,8 +37,10 @@ def id(self, id: int) -> FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpenset Returns: FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint: The initialized FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint object. """ - child = FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint( - self.client, parent_endpoint=self + child = ( + FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint( + self.client, parent_endpoint=self + ) ) child._id = id return child @@ -56,7 +68,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxableExpenseTypeLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxableExpenseTypeLevel]: """ Performs a GET request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id}/taxableExpenseTypeLevels endpoint. @@ -66,9 +80,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxableExpenseTypeLevel]: The parsed response data. """ - return self._parse_many(TaxableExpenseTypeLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxableExpenseTypeLevel, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableExpenseTypeLevel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableExpenseTypeLevel: """ Performs a POST request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id}/taxableExpenseTypeLevels endpoint. @@ -78,4 +97,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxableExpenseTypeLevel: The parsed response data. """ - return self._parse_one(TaxableExpenseTypeLevel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TaxableExpenseTypeLevel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsIdEndpoint.py index 624b35dec..80c0195d0 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdExpenseTypeExemptionsIdTaxableExpenseTypeLevelsIdEndpoint.py @@ -6,7 +6,9 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdExpensetypeexemptionsIdTaxableexpensetypelevelsIdEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableExpenseTypeLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableExpenseTypeLevel: """ Performs a GET request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id}/taxableExpenseTypeLevels/{id} endpoint. @@ -43,9 +47,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxableExpenseTypeLevel: The parsed response data. """ - return self._parse_one(TaxableExpenseTypeLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxableExpenseTypeLevel, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id}/taxableExpenseTypeLevels/{id} endpoint. @@ -55,9 +64,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableExpenseTypeLevel: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableExpenseTypeLevel: """ Performs a PUT request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id}/taxableExpenseTypeLevels/{id} endpoint. @@ -67,9 +81,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxableExpenseTypeLevel: The parsed response data. """ - return self._parse_one(TaxableExpenseTypeLevel, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TaxableExpenseTypeLevel, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableExpenseTypeLevel: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableExpenseTypeLevel: """ Performs a PATCH request against the /finance/taxCodes/{id}/expenseTypeExemptions/{id}/taxableExpenseTypeLevels/{id} endpoint. @@ -79,4 +98,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxableExpenseTypeLevel: The parsed response data. """ - return self._parse_one(TaxableExpenseTypeLevel, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TaxableExpenseTypeLevel, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdInfoEndpoint.py index 3d14ccfe9..f71ddf409 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdInfoEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TaxCodeInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TaxCodeInfo]: """ Performs a GET request against the /finance/taxCodes/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCodeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCodeInfo: """ Performs a GET request against the /finance/taxCodes/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxCodeInfo: The parsed response data. """ - return self._parse_one(TaxCodeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxCodeInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsCountEndpoint.py index ea337bd20..69edf7f47 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesIdProducttypeexemptionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/{id}/productTypeExemptions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/{id}/productTypeExemptions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsEndpoint.py index 0a9a23b8e..7b00e90f7 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsCountEndpoint import \ - FinanceTaxcodesIdProducttypeexemptionsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsIdEndpoint import \ - FinanceTaxcodesIdProducttypeexemptionsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsCountEndpoint import ( + FinanceTaxcodesIdProducttypeexemptionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsIdEndpoint import ( + FinanceTaxcodesIdProducttypeexemptionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductTypeExemption from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class FinanceTaxcodesIdProducttypeexemptionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "productTypeExemptions", parent_endpoint=parent_endpoint) + super().__init__( + client, "productTypeExemptions", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - FinanceTaxcodesIdProducttypeexemptionsCountEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdProducttypeexemptionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceTaxcodesIdProducttypeexemptionsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> FinanceTaxcodesIdProducttypeexemptionsIdEndpoint: Returns: FinanceTaxcodesIdProducttypeexemptionsIdEndpoint: The initialized FinanceTaxcodesIdProducttypeexemptionsIdEndpoint object. """ - child = FinanceTaxcodesIdProducttypeexemptionsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceTaxcodesIdProducttypeexemptionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductTypeExemption]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductTypeExemption]: """ Performs a GET request against the /finance/taxCodes/{id}/productTypeExemptions endpoint. @@ -64,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductTypeExemption]: The parsed response data. """ - return self._parse_many(ProductTypeExemption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProductTypeExemption, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductTypeExemption: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductTypeExemption: """ Performs a POST request against the /finance/taxCodes/{id}/productTypeExemptions endpoint. @@ -76,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProductTypeExemption: The parsed response data. """ - return self._parse_one(ProductTypeExemption, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProductTypeExemption, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdEndpoint.py index cecd28e07..397ce86b7 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsEndpoint import \ - FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsEndpoint import ( + FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductTypeExemption from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.taxable_product_type_levels = self._register_child_endpoint( - FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductTypeExemption: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductTypeExemption: """ Performs a GET request against the /finance/taxCodes/{id}/productTypeExemptions/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProductTypeExemption: The parsed response data. """ - return self._parse_one(ProductTypeExemption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProductTypeExemption, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id}/productTypeExemptions/{id} endpoint. @@ -61,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductTypeExemption: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductTypeExemption: """ Performs a PUT request against the /finance/taxCodes/{id}/productTypeExemptions/{id} endpoint. @@ -73,9 +88,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProductTypeExemption: The parsed response data. """ - return self._parse_one(ProductTypeExemption, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProductTypeExemption, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductTypeExemption: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductTypeExemption: """ Performs a PATCH request against the /finance/taxCodes/{id}/productTypeExemptions/{id} endpoint. @@ -85,4 +105,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProductTypeExemption: The parsed response data. """ - return self._parse_one(ProductTypeExemption, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProductTypeExemption, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsCountEndpoint.py index 8b003d732..042c558fd 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsCountEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/{id}/productTypeExemptions/{id}/taxableProductTypeLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/{id}/productTypeExemptions/{id}/taxableProductTypeLevels/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsEndpoint.py index c0173668a..d3113f60c 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsEndpoint.py @@ -1,24 +1,34 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsCountEndpoint import \ - FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint import \ - FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsCountEndpoint import ( + FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint import ( + FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxableProductTypeLevel from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "taxableProductTypeLevels", parent_endpoint=parent_endpoint) + super().__init__( + client, "taxableProductTypeLevels", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsCountEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsCountEndpoint( + client, parent_endpoint=self + ) ) - def id(self, id: int) -> FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint: + def id( + self, id: int + ) -> FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint: """ Sets the ID for this endpoint and returns an initialized FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint object to move down the chain. @@ -27,8 +37,10 @@ def id(self, id: int) -> FinanceTaxcodesIdProducttypeexemptionsIdTaxableproductt Returns: FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint: The initialized FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint object. """ - child = FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint( - self.client, parent_endpoint=self + child = ( + FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint( + self.client, parent_endpoint=self + ) ) child._id = id return child @@ -56,7 +68,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxableProductTypeLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxableProductTypeLevel]: """ Performs a GET request against the /finance/taxCodes/{id}/productTypeExemptions/{id}/taxableProductTypeLevels endpoint. @@ -66,9 +80,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxableProductTypeLevel]: The parsed response data. """ - return self._parse_many(TaxableProductTypeLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxableProductTypeLevel, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableProductTypeLevel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableProductTypeLevel: """ Performs a POST request against the /finance/taxCodes/{id}/productTypeExemptions/{id}/taxableProductTypeLevels endpoint. @@ -78,4 +97,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxableProductTypeLevel: The parsed response data. """ - return self._parse_one(TaxableProductTypeLevel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TaxableProductTypeLevel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsIdEndpoint.py index 525aea9b9..ee3a4f68a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdProductTypeExemptionsIdTaxableProductTypeLevelsIdEndpoint.py @@ -6,7 +6,9 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdProducttypeexemptionsIdTaxableproducttypelevelsIdEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableProductTypeLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableProductTypeLevel: """ Performs a GET request against the /finance/taxCodes/{id}/productTypeExemptions/{id}/taxableProductTypeLevels/{id} endpoint. @@ -43,9 +47,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxableProductTypeLevel: The parsed response data. """ - return self._parse_one(TaxableProductTypeLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxableProductTypeLevel, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id}/productTypeExemptions/{id}/taxableProductTypeLevels/{id} endpoint. @@ -55,9 +64,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableProductTypeLevel: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableProductTypeLevel: """ Performs a PUT request against the /finance/taxCodes/{id}/productTypeExemptions/{id}/taxableProductTypeLevels/{id} endpoint. @@ -67,9 +81,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxableProductTypeLevel: The parsed response data. """ - return self._parse_one(TaxableProductTypeLevel, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TaxableProductTypeLevel, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableProductTypeLevel: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableProductTypeLevel: """ Performs a PATCH request against the /finance/taxCodes/{id}/productTypeExemptions/{id}/taxableProductTypeLevels/{id} endpoint. @@ -79,4 +98,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxableProductTypeLevel: The parsed response data. """ - return self._parse_one(TaxableProductTypeLevel, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TaxableProductTypeLevel, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsCountEndpoint.py index 02810732c..6e9ce068d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesIdTaxcodelevelsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeLevels/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsEndpoint.py index 127f9b9ab..4c381ec4d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodelevelsCountEndpoint import \ - FinanceTaxcodesIdTaxcodelevelsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodelevelsIdEndpoint import \ - FinanceTaxcodesIdTaxcodelevelsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodelevelsCountEndpoint import ( + FinanceTaxcodesIdTaxcodelevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodelevelsIdEndpoint import ( + FinanceTaxcodesIdTaxcodelevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxCodeLevel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> FinanceTaxcodesIdTaxcodelevelsIdEndpoint: Returns: FinanceTaxcodesIdTaxcodelevelsIdEndpoint: The initialized FinanceTaxcodesIdTaxcodelevelsIdEndpoint object. """ - child = FinanceTaxcodesIdTaxcodelevelsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceTaxcodesIdTaxcodelevelsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxCodeLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxCodeLevel]: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeLevels endpoint. @@ -64,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxCodeLevel]: The parsed response data. """ - return self._parse_many(TaxCodeLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxCodeLevel, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCodeLevel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCodeLevel: """ Performs a POST request against the /finance/taxCodes/{id}/taxCodeLevels endpoint. @@ -76,4 +86,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxCodeLevel: The parsed response data. """ - return self._parse_one(TaxCodeLevel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TaxCodeLevel, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsIdEndpoint.py index 4dc33834f..f6a01bf9e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeLevelsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCodeLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCodeLevel: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeLevels/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxCodeLevel: The parsed response data. """ - return self._parse_one(TaxCodeLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxCodeLevel, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id}/taxCodeLevels/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCodeLevel: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCodeLevel: """ Performs a PUT request against the /finance/taxCodes/{id}/taxCodeLevels/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxCodeLevel: The parsed response data. """ - return self._parse_one(TaxCodeLevel, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TaxCodeLevel, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCodeLevel: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCodeLevel: """ Performs a PATCH request against the /finance/taxCodes/{id}/taxCodeLevels/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxCodeLevel: The parsed response data. """ - return self._parse_one(TaxCodeLevel, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TaxCodeLevel, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsCountEndpoint.py index e745dfec1..6d88ec739 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesIdTaxcodexrefsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsEndpoint.py index f6a36884a..997b0120a 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsCountEndpoint import \ - FinanceTaxcodesIdTaxcodexrefsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsIdEndpoint import \ - FinanceTaxcodesIdTaxcodexrefsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsCountEndpoint import ( + FinanceTaxcodesIdTaxcodexrefsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsIdEndpoint import ( + FinanceTaxcodesIdTaxcodexrefsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxCodeXRef from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,11 +29,15 @@ def id(self, id: int) -> FinanceTaxcodesIdTaxcodexrefsIdEndpoint: Returns: FinanceTaxcodesIdTaxcodexrefsIdEndpoint: The initialized FinanceTaxcodesIdTaxcodexrefsIdEndpoint object. """ - child = FinanceTaxcodesIdTaxcodexrefsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceTaxcodesIdTaxcodexrefsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TaxCodeXRef]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TaxCodeXRef]: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxCodeXRef]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxCodeXRef]: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs endpoint. @@ -62,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxCodeXRef]: The parsed response data. """ - return self._parse_many(TaxCodeXRef, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxCodeXRef, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCodeXRef: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCodeXRef: """ Performs a POST request against the /finance/taxCodes/{id}/taxCodeXRefs endpoint. @@ -74,4 +86,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxCodeXRef: The parsed response data. """ - return self._parse_one(TaxCodeXRef, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TaxCodeXRef, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdEndpoint.py index b6100891c..6597a4961 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsEndpoint import \ - FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsEndpoint import ( + FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxCodeXRef from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +14,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.taxable_x_ref_levels = self._register_child_endpoint( - FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsEndpoint( + client, parent_endpoint=self + ) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TaxCodeXRef]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TaxCodeXRef]: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs/{id} endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +42,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCodeXRef: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCodeXRef: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs/{id} endpoint. @@ -47,9 +54,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxCodeXRef: The parsed response data. """ - return self._parse_one(TaxCodeXRef, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxCodeXRef, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id}/taxCodeXRefs/{id} endpoint. @@ -59,9 +70,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCodeXRef: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCodeXRef: """ Performs a PUT request against the /finance/taxCodes/{id}/taxCodeXRefs/{id} endpoint. @@ -71,9 +87,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxCodeXRef: The parsed response data. """ - return self._parse_one(TaxCodeXRef, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TaxCodeXRef, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxCodeXRef: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxCodeXRef: """ Performs a PATCH request against the /finance/taxCodes/{id}/taxCodeXRefs/{id} endpoint. @@ -83,4 +103,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxCodeXRef: The parsed response data. """ - return self._parse_one(TaxCodeXRef, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TaxCodeXRef, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsCountEndpoint.py index 7888b4e7b..338fa82fd 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsCountEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs/{id}/taxableXRefLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs/{id}/taxableXRefLevels/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsEndpoint.py index 50a018aa9..baa63710e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsCountEndpoint import \ - FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpoint import \ - FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsCountEndpoint import ( + FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpoint import ( + FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxableXRefLevel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "taxableXRefLevels", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsCountEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpo Returns: FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpoint: The initialized FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpoint object. """ - child = FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceTaxcodesIdTaxcodexrefsIdTaxablexreflevelsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxableXRefLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxableXRefLevel]: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs/{id}/taxableXRefLevels endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxableXRefLevel]: The parsed response data. """ - return self._parse_many(TaxableXRefLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxableXRefLevel, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableXRefLevel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableXRefLevel: """ Performs a POST request against the /finance/taxCodes/{id}/taxCodeXRefs/{id}/taxableXRefLevels endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxableXRefLevel: The parsed response data. """ - return self._parse_one(TaxableXRefLevel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TaxableXRefLevel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsIdEndpoint.py index d65ff92ff..f71eaf2bf 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdTaxCodeXRefsIdTaxableXRefLevelsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableXRefLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableXRefLevel: """ Performs a GET request against the /finance/taxCodes/{id}/taxCodeXRefs/{id}/taxableXRefLevels/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxableXRefLevel: The parsed response data. """ - return self._parse_one(TaxableXRefLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxableXRefLevel, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id}/taxCodeXRefs/{id}/taxableXRefLevels/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableXRefLevel: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableXRefLevel: """ Performs a PUT request against the /finance/taxCodes/{id}/taxCodeXRefs/{id}/taxableXRefLevels/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxableXRefLevel: The parsed response data. """ - return self._parse_one(TaxableXRefLevel, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TaxableXRefLevel, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableXRefLevel: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableXRefLevel: """ Performs a PATCH request against the /finance/taxCodes/{id}/taxCodeXRefs/{id}/taxableXRefLevels/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxableXRefLevel: The parsed response data. """ - return self._parse_one(TaxableXRefLevel, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TaxableXRefLevel, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdUsagesEndpoint.py index 9a6d86714..d00673e7c 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdUsagesListEndpoint import FinanceTaxcodesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdUsagesListEndpoint import ( + FinanceTaxcodesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class FinanceTaxcodesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(FinanceTaxcodesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + FinanceTaxcodesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/taxCodes/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/taxCodes/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdUsagesListEndpoint.py index cd82fbcca..4c828952d 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /finance/taxCodes/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /finance/taxCodes/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsCountEndpoint.py index 7ab2fea2d..0f853af7e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesIdWorkroleexemptionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/{id}/workRoleExemptions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/{id}/workRoleExemptions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsEndpoint.py index d42d2df23..71ecd5039 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsCountEndpoint import \ - FinanceTaxcodesIdWorkroleexemptionsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsIdEndpoint import \ - FinanceTaxcodesIdWorkroleexemptionsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsCountEndpoint import ( + FinanceTaxcodesIdWorkroleexemptionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsIdEndpoint import ( + FinanceTaxcodesIdWorkroleexemptionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkRoleExemption from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "workRoleExemptions", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - FinanceTaxcodesIdWorkroleexemptionsCountEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdWorkroleexemptionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> FinanceTaxcodesIdWorkroleexemptionsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> FinanceTaxcodesIdWorkroleexemptionsIdEndpoint: Returns: FinanceTaxcodesIdWorkroleexemptionsIdEndpoint: The initialized FinanceTaxcodesIdWorkroleexemptionsIdEndpoint object. """ - child = FinanceTaxcodesIdWorkroleexemptionsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceTaxcodesIdWorkroleexemptionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkRoleExemption]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkRoleExemption]: """ Performs a GET request against the /finance/taxCodes/{id}/workRoleExemptions endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkRoleExemption]: The parsed response data. """ - return self._parse_many(WorkRoleExemption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkRoleExemption, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRoleExemption: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRoleExemption: """ Performs a POST request against the /finance/taxCodes/{id}/workRoleExemptions endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkRoleExemption: The parsed response data. """ - return self._parse_one(WorkRoleExemption, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + WorkRoleExemption, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdEndpoint.py index c83aa1aa1..9994a34b7 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsEndpoint import \ - FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsEndpoint import ( + FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkRoleExemption from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.taxable_work_role_levels = self._register_child_endpoint( - FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRoleExemption: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRoleExemption: """ Performs a GET request against the /finance/taxCodes/{id}/workRoleExemptions/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkRoleExemption: The parsed response data. """ - return self._parse_one(WorkRoleExemption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkRoleExemption, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id}/workRoleExemptions/{id} endpoint. @@ -61,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRoleExemption: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRoleExemption: """ Performs a PUT request against the /finance/taxCodes/{id}/workRoleExemptions/{id} endpoint. @@ -73,9 +88,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkRoleExemption: The parsed response data. """ - return self._parse_one(WorkRoleExemption, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + WorkRoleExemption, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRoleExemption: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRoleExemption: """ Performs a PATCH request against the /finance/taxCodes/{id}/workRoleExemptions/{id} endpoint. @@ -85,4 +105,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkRoleExemption: The parsed response data. """ - return self._parse_one(WorkRoleExemption, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + WorkRoleExemption, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsCountEndpoint.py index cde0a9f48..d4f240c95 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsCountEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/{id}/workRoleExemptions/{id}/taxableWorkRoleLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/{id}/workRoleExemptions/{id}/taxableWorkRoleLevels/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsEndpoint.py index 0d2d90fa7..40d68dd2e 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsEndpoint.py @@ -1,24 +1,34 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsCountEndpoint import \ - FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint import \ - FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsCountEndpoint import ( + FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint import ( + FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxableWorkRoleLevel from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "taxableWorkRoleLevels", parent_endpoint=parent_endpoint) + super().__init__( + client, "taxableWorkRoleLevels", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsCountEndpoint(client, parent_endpoint=self) + FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsCountEndpoint( + client, parent_endpoint=self + ) ) - def id(self, id: int) -> FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint: + def id( + self, id: int + ) -> FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint: """ Sets the ID for this endpoint and returns an initialized FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint object to move down the chain. @@ -27,7 +37,9 @@ def id(self, id: int) -> FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelev Returns: FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint: The initialized FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint object. """ - child = FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint(self.client, parent_endpoint=self) + child = FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +66,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxableWorkRoleLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxableWorkRoleLevel]: """ Performs a GET request against the /finance/taxCodes/{id}/workRoleExemptions/{id}/taxableWorkRoleLevels endpoint. @@ -64,9 +78,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxableWorkRoleLevel]: The parsed response data. """ - return self._parse_many(TaxableWorkRoleLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxableWorkRoleLevel, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableWorkRoleLevel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableWorkRoleLevel: """ Performs a POST request against the /finance/taxCodes/{id}/workRoleExemptions/{id}/taxableWorkRoleLevels endpoint. @@ -76,4 +95,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxableWorkRoleLevel: The parsed response data. """ - return self._parse_one(TaxableWorkRoleLevel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TaxableWorkRoleLevel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsIdEndpoint.py index 3c4debe60..0127f31d6 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesIdWorkRoleExemptionsIdTaxableWorkRoleLevelsIdEndpoint.py @@ -6,7 +6,9 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint(ConnectWiseEndpoint): +class FinanceTaxcodesIdWorkroleexemptionsIdTaxableworkrolelevelsIdEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableWorkRoleLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableWorkRoleLevel: """ Performs a GET request against the /finance/taxCodes/{id}/workRoleExemptions/{id}/taxableWorkRoleLevels/{id} endpoint. @@ -43,9 +47,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxableWorkRoleLevel: The parsed response data. """ - return self._parse_one(TaxableWorkRoleLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxableWorkRoleLevel, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /finance/taxCodes/{id}/workRoleExemptions/{id}/taxableWorkRoleLevels/{id} endpoint. @@ -55,9 +64,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableWorkRoleLevel: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableWorkRoleLevel: """ Performs a PUT request against the /finance/taxCodes/{id}/workRoleExemptions/{id}/taxableWorkRoleLevels/{id} endpoint. @@ -67,9 +81,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxableWorkRoleLevel: The parsed response data. """ - return self._parse_one(TaxableWorkRoleLevel, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TaxableWorkRoleLevel, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxableWorkRoleLevel: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxableWorkRoleLevel: """ Performs a PATCH request against the /finance/taxCodes/{id}/workRoleExemptions/{id}/taxableWorkRoleLevels/{id} endpoint. @@ -79,4 +98,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxableWorkRoleLevel: The parsed response data. """ - return self._parse_one(TaxableWorkRoleLevel, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TaxableWorkRoleLevel, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesInfoCountEndpoint.py index c84d8412e..e41210514 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxcodesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxCodes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxCodes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesInfoEndpoint.py index ca98d9e14..00445d773 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxCodesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxCodesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxcodesInfoCountEndpoint import FinanceTaxcodesInfoCountEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxcodesInfoCountEndpoint import ( + FinanceTaxcodesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxCodeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class FinanceTaxcodesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceTaxcodesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceTaxcodesInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TaxCodeInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TaxCodeInfo]: """ Performs a GET request against the /finance/taxCodes/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxCodeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxCodeInfo]: """ Performs a GET request against the /finance/taxCodes/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxCodeInfo]: The parsed response data. """ - return self._parse_many(TaxCodeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxCodeInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsCountEndpoint.py index a0c403896..f0f372cee 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsCountEndpoint.py @@ -10,7 +10,9 @@ class FinanceTaxintegrationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /finance/taxIntegrations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /finance/taxIntegrations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsEndpoint.py index 47a6552e4..f7ec4b9c3 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxintegrationsCountEndpoint import FinanceTaxintegrationsCountEndpoint -from pyconnectwise.endpoints.manage.FinanceTaxintegrationsIdEndpoint import FinanceTaxintegrationsIdEndpoint +from pyconnectwise.endpoints.manage.FinanceTaxintegrationsCountEndpoint import ( + FinanceTaxintegrationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.FinanceTaxintegrationsIdEndpoint import ( + FinanceTaxintegrationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TaxIntegration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class FinanceTaxintegrationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "taxIntegrations", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(FinanceTaxintegrationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + FinanceTaxintegrationsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> FinanceTaxintegrationsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TaxIntegration]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TaxIntegration]: """ Performs a GET request against the /finance/taxIntegrations endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TaxIntegration]: The parsed response data. """ - return self._parse_many(TaxIntegration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TaxIntegration, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsIdEndpoint.py index aa720960f..b3ccb9089 100644 --- a/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/FinanceTaxIntegrationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxIntegration: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxIntegration: """ Performs a GET request against the /finance/taxIntegrations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxIntegration: The parsed response data. """ - return self._parse_one(TaxIntegration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TaxIntegration, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxIntegration: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxIntegration: """ Performs a PUT request against the /finance/taxIntegrations/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TaxIntegration: The parsed response data. """ - return self._parse_one(TaxIntegration, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TaxIntegration, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TaxIntegration: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TaxIntegration: """ Performs a PATCH request against the /finance/taxIntegrations/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TaxIntegration: The parsed response data. """ - return self._parse_one(TaxIntegration, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TaxIntegration, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsCountEndpoint.py index 1cac78392..fe1830190 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsEndpoint.py index b68771e89..7b7d84173 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsEndpoint.py @@ -1,11 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsCountEndpoint import MarketingCampaignsCountEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdEndpoint import MarketingCampaignsIdEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsStatusesEndpoint import MarketingCampaignsStatusesEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsSubtypesEndpoint import MarketingCampaignsSubtypesEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsTypesEndpoint import MarketingCampaignsTypesEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsCountEndpoint import ( + MarketingCampaignsCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdEndpoint import ( + MarketingCampaignsIdEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsStatusesEndpoint import ( + MarketingCampaignsStatusesEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsSubtypesEndpoint import ( + MarketingCampaignsSubtypesEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsTypesEndpoint import ( + MarketingCampaignsTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Campaign from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,10 +25,18 @@ class MarketingCampaignsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "campaigns", parent_endpoint=parent_endpoint) - self.sub_types = self._register_child_endpoint(MarketingCampaignsSubtypesEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(MarketingCampaignsCountEndpoint(client, parent_endpoint=self)) - self.types = self._register_child_endpoint(MarketingCampaignsTypesEndpoint(client, parent_endpoint=self)) - self.statuses = self._register_child_endpoint(MarketingCampaignsStatusesEndpoint(client, parent_endpoint=self)) + self.sub_types = self._register_child_endpoint( + MarketingCampaignsSubtypesEndpoint(client, parent_endpoint=self) + ) + self.types = self._register_child_endpoint( + MarketingCampaignsTypesEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + MarketingCampaignsCountEndpoint(client, parent_endpoint=self) + ) + self.statuses = self._register_child_endpoint( + MarketingCampaignsStatusesEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> MarketingCampaignsIdEndpoint: """ @@ -33,7 +51,9 @@ def id(self, id: int) -> MarketingCampaignsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Campaign]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Campaign]: """ Performs a GET request against the /marketing/campaigns endpoint and returns an initialized PaginatedResponse object. @@ -54,7 +74,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Campaign]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Campaign]: """ Performs a GET request against the /marketing/campaigns endpoint. @@ -64,9 +86,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Campaign]: The parsed response data. """ - return self._parse_many(Campaign, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Campaign, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Campaign: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Campaign: """ Performs a POST request against the /marketing/campaigns endpoint. @@ -76,4 +102,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Campaign: The parsed response data. """ - return self._parse_one(Campaign, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Campaign, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdActivitiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdActivitiesCountEndpoint.py index 64f97d997..e78ffff84 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdActivitiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdActivitiesCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsIdActivitiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/{id}/activities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/{id}/activities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdActivitiesEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdActivitiesEndpoint.py index 95ec4f0cf..e99f37cb9 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdActivitiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdActivitiesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdActivitiesCountEndpoint import \ - MarketingCampaignsIdActivitiesCountEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsIdActivitiesCountEndpoint import ( + MarketingCampaignsIdActivitiesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ActivityReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ActivityReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ActivityReference]: """ Performs a GET request against the /marketing/campaigns/{id}/activities endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ActivityReference]: The parsed response data. """ - return self._parse_many(ActivityReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ActivityReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsCountEndpoint.py index 37a3238e9..c8061e31e 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsIdAuditsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/{id}/audits/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/{id}/audits/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsEndpoint.py index 857d72059..aa2843a1a 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdAuditsCountEndpoint import \ - MarketingCampaignsIdAuditsCountEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdAuditsIdEndpoint import MarketingCampaignsIdAuditsIdEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsIdAuditsCountEndpoint import ( + MarketingCampaignsIdAuditsCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdAuditsIdEndpoint import ( + MarketingCampaignsIdAuditsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CampaignAudit from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CampaignAudit]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CampaignAudit]: """ Performs a GET request against the /marketing/campaigns/{id}/audits endpoint. @@ -63,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CampaignAudit]: The parsed response data. """ - return self._parse_many(CampaignAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CampaignAudit, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignAudit: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignAudit: """ Performs a POST request against the /marketing/campaigns/{id}/audits endpoint. @@ -75,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CampaignAudit: The parsed response data. """ - return self._parse_one(CampaignAudit, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CampaignAudit, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsIdEndpoint.py index 7ab90bcde..2b44a416c 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdAuditsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignAudit: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignAudit: """ Performs a GET request against the /marketing/campaigns/{id}/audits/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignAudit: The parsed response data. """ - return self._parse_one(CampaignAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CampaignAudit, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/campaigns/{id}/audits/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignAudit: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignAudit: """ Performs a PUT request against the /marketing/campaigns/{id}/audits/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignAudit: The parsed response data. """ - return self._parse_one(CampaignAudit, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CampaignAudit, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignAudit: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignAudit: """ Performs a PATCH request against the /marketing/campaigns/{id}/audits/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CampaignAudit: The parsed response data. """ - return self._parse_one(CampaignAudit, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CampaignAudit, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedCountEndpoint.py index 5136a403e..779ac995a 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsIdEmailsopenedCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/{id}/emailsOpened/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/{id}/emailsOpened/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedEndpoint.py index 3351b252d..5076c5e8f 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdEmailsopenedCountEndpoint import \ - MarketingCampaignsIdEmailsopenedCountEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdEmailsopenedIdEndpoint import \ - MarketingCampaignsIdEmailsopenedIdEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsIdEmailsopenedCountEndpoint import ( + MarketingCampaignsIdEmailsopenedCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdEmailsopenedIdEndpoint import ( + MarketingCampaignsIdEmailsopenedIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EmailOpened from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,11 +29,15 @@ def id(self, id: int) -> MarketingCampaignsIdEmailsopenedIdEndpoint: Returns: MarketingCampaignsIdEmailsopenedIdEndpoint: The initialized MarketingCampaignsIdEmailsopenedIdEndpoint object. """ - child = MarketingCampaignsIdEmailsopenedIdEndpoint(self.client, parent_endpoint=self) + child = MarketingCampaignsIdEmailsopenedIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[EmailOpened]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[EmailOpened]: """ Performs a GET request against the /marketing/campaigns/{id}/emailsOpened endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EmailOpened]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EmailOpened]: """ Performs a GET request against the /marketing/campaigns/{id}/emailsOpened endpoint. @@ -62,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EmailOpened]: The parsed response data. """ - return self._parse_many(EmailOpened, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EmailOpened, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailOpened: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailOpened: """ Performs a POST request against the /marketing/campaigns/{id}/emailsOpened endpoint. @@ -74,4 +86,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: EmailOpened: The parsed response data. """ - return self._parse_one(EmailOpened, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + EmailOpened, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedIdEndpoint.py index 73b1ae137..68d63efa5 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEmailsOpenedIdEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsIdEmailsopenedIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[EmailOpened]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[EmailOpened]: """ Performs a GET request against the /marketing/campaigns/{id}/emailsOpened/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailOpened: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailOpened: """ Performs a GET request against the /marketing/campaigns/{id}/emailsOpened/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailOpened: The parsed response data. """ - return self._parse_one(EmailOpened, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + EmailOpened, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/campaigns/{id}/emailsOpened/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailOpened: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailOpened: """ Performs a PUT request against the /marketing/campaigns/{id}/emailsOpened/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailOpened: The parsed response data. """ - return self._parse_one(EmailOpened, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + EmailOpened, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailOpened: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailOpened: """ Performs a PATCH request against the /marketing/campaigns/{id}/emailsOpened/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: EmailOpened: The parsed response data. """ - return self._parse_one(EmailOpened, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + EmailOpened, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEndpoint.py index 09520108f..547738d56 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdEndpoint.py @@ -1,16 +1,24 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdActivitiesEndpoint import MarketingCampaignsIdActivitiesEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdAuditsEndpoint import MarketingCampaignsIdAuditsEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdEmailsopenedEndpoint import \ - MarketingCampaignsIdEmailsopenedEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdFormssubmittedEndpoint import \ - MarketingCampaignsIdFormssubmittedEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdLinksclickedEndpoint import \ - MarketingCampaignsIdLinksclickedEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdOpportunitiesEndpoint import \ - MarketingCampaignsIdOpportunitiesEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsIdActivitiesEndpoint import ( + MarketingCampaignsIdActivitiesEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdAuditsEndpoint import ( + MarketingCampaignsIdAuditsEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdEmailsopenedEndpoint import ( + MarketingCampaignsIdEmailsopenedEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdFormssubmittedEndpoint import ( + MarketingCampaignsIdFormssubmittedEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdLinksclickedEndpoint import ( + MarketingCampaignsIdLinksclickedEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdOpportunitiesEndpoint import ( + MarketingCampaignsIdOpportunitiesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Campaign from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,24 +28,28 @@ class MarketingCampaignsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.audits = self._register_child_endpoint(MarketingCampaignsIdAuditsEndpoint(client, parent_endpoint=self)) self.opportunities = self._register_child_endpoint( MarketingCampaignsIdOpportunitiesEndpoint(client, parent_endpoint=self) ) + self.audits = self._register_child_endpoint( + MarketingCampaignsIdAuditsEndpoint(client, parent_endpoint=self) + ) self.emails_opened = self._register_child_endpoint( MarketingCampaignsIdEmailsopenedEndpoint(client, parent_endpoint=self) ) - self.forms_submitted = self._register_child_endpoint( - MarketingCampaignsIdFormssubmittedEndpoint(client, parent_endpoint=self) - ) self.activities = self._register_child_endpoint( MarketingCampaignsIdActivitiesEndpoint(client, parent_endpoint=self) ) + self.forms_submitted = self._register_child_endpoint( + MarketingCampaignsIdFormssubmittedEndpoint(client, parent_endpoint=self) + ) self.links_clicked = self._register_child_endpoint( MarketingCampaignsIdLinksclickedEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Campaign]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Campaign]: """ Performs a GET request against the /marketing/campaigns/{id} endpoint and returns an initialized PaginatedResponse object. @@ -58,7 +70,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Campaign: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Campaign: """ Performs a GET request against the /marketing/campaigns/{id} endpoint. @@ -68,9 +82,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Campaign: The parsed response data. """ - return self._parse_one(Campaign, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Campaign, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/campaigns/{id} endpoint. @@ -80,9 +98,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Campaign: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Campaign: """ Performs a PUT request against the /marketing/campaigns/{id} endpoint. @@ -92,9 +115,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Campaign: The parsed response data. """ - return self._parse_one(Campaign, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Campaign, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Campaign: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Campaign: """ Performs a PATCH request against the /marketing/campaigns/{id} endpoint. @@ -104,4 +131,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Campaign: The parsed response data. """ - return self._parse_one(Campaign, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Campaign, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedCountEndpoint.py index 555a63960..656c3d2ed 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsIdFormssubmittedCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/{id}/formsSubmitted/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/{id}/formsSubmitted/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedEndpoint.py index dc340e2aa..3f3f5ccf6 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdFormssubmittedCountEndpoint import \ - MarketingCampaignsIdFormssubmittedCountEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdFormssubmittedIdEndpoint import \ - MarketingCampaignsIdFormssubmittedIdEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsIdFormssubmittedCountEndpoint import ( + MarketingCampaignsIdFormssubmittedCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdFormssubmittedIdEndpoint import ( + MarketingCampaignsIdFormssubmittedIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import FormSubmitted from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "formsSubmitted", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - MarketingCampaignsIdFormssubmittedCountEndpoint(client, parent_endpoint=self) + MarketingCampaignsIdFormssubmittedCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> MarketingCampaignsIdFormssubmittedIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> MarketingCampaignsIdFormssubmittedIdEndpoint: Returns: MarketingCampaignsIdFormssubmittedIdEndpoint: The initialized MarketingCampaignsIdFormssubmittedIdEndpoint object. """ - child = MarketingCampaignsIdFormssubmittedIdEndpoint(self.client, parent_endpoint=self) + child = MarketingCampaignsIdFormssubmittedIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[FormSubmitted]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[FormSubmitted]: """ Performs a GET request against the /marketing/campaigns/{id}/formsSubmitted endpoint. @@ -64,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[FormSubmitted]: The parsed response data. """ - return self._parse_many(FormSubmitted, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + FormSubmitted, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> FormSubmitted: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> FormSubmitted: """ Performs a POST request against the /marketing/campaigns/{id}/formsSubmitted endpoint. @@ -76,4 +88,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: FormSubmitted: The parsed response data. """ - return self._parse_one(FormSubmitted, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + FormSubmitted, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedIdEndpoint.py index 98efd115a..67a262106 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdFormsSubmittedIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> FormSubmitted: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> FormSubmitted: """ Performs a GET request against the /marketing/campaigns/{id}/formsSubmitted/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> F Returns: FormSubmitted: The parsed response data. """ - return self._parse_one(FormSubmitted, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + FormSubmitted, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/campaigns/{id}/formsSubmitted/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> FormSubmitted: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> FormSubmitted: """ Performs a PUT request against the /marketing/campaigns/{id}/formsSubmitted/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> F Returns: FormSubmitted: The parsed response data. """ - return self._parse_one(FormSubmitted, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + FormSubmitted, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> FormSubmitted: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> FormSubmitted: """ Performs a PATCH request against the /marketing/campaigns/{id}/formsSubmitted/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: FormSubmitted: The parsed response data. """ - return self._parse_one(FormSubmitted, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + FormSubmitted, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedCountEndpoint.py index 584714a6b..d091bae42 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsIdLinksclickedCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/{id}/linksClicked/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/{id}/linksClicked/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedEndpoint.py index ddf2e951b..affd2e5a2 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdLinksclickedCountEndpoint import \ - MarketingCampaignsIdLinksclickedCountEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdLinksclickedIdEndpoint import \ - MarketingCampaignsIdLinksclickedIdEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsIdLinksclickedCountEndpoint import ( + MarketingCampaignsIdLinksclickedCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsIdLinksclickedIdEndpoint import ( + MarketingCampaignsIdLinksclickedIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LinkClicked from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,11 +29,15 @@ def id(self, id: int) -> MarketingCampaignsIdLinksclickedIdEndpoint: Returns: MarketingCampaignsIdLinksclickedIdEndpoint: The initialized MarketingCampaignsIdLinksclickedIdEndpoint object. """ - child = MarketingCampaignsIdLinksclickedIdEndpoint(self.client, parent_endpoint=self) + child = MarketingCampaignsIdLinksclickedIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[LinkClicked]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[LinkClicked]: """ Performs a GET request against the /marketing/campaigns/{id}/linksClicked endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LinkClicked]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LinkClicked]: """ Performs a GET request against the /marketing/campaigns/{id}/linksClicked endpoint. @@ -62,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LinkClicked]: The parsed response data. """ - return self._parse_many(LinkClicked, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LinkClicked, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LinkClicked: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LinkClicked: """ Performs a POST request against the /marketing/campaigns/{id}/linksClicked endpoint. @@ -74,4 +86,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: LinkClicked: The parsed response data. """ - return self._parse_one(LinkClicked, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + LinkClicked, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedIdEndpoint.py index 92e6deae3..139e0170d 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdLinksClickedIdEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsIdLinksclickedIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[LinkClicked]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[LinkClicked]: """ Performs a GET request against the /marketing/campaigns/{id}/linksClicked/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LinkClicked: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LinkClicked: """ Performs a GET request against the /marketing/campaigns/{id}/linksClicked/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LinkClicked: The parsed response data. """ - return self._parse_one(LinkClicked, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LinkClicked, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/campaigns/{id}/linksClicked/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LinkClicked: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LinkClicked: """ Performs a PUT request against the /marketing/campaigns/{id}/linksClicked/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LinkClicked: The parsed response data. """ - return self._parse_one(LinkClicked, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + LinkClicked, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LinkClicked: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LinkClicked: """ Performs a PATCH request against the /marketing/campaigns/{id}/linksClicked/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: LinkClicked: The parsed response data. """ - return self._parse_one(LinkClicked, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + LinkClicked, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdOpportunitiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdOpportunitiesCountEndpoint.py index 387146647..fa905a1e0 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdOpportunitiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdOpportunitiesCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsIdOpportunitiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/{id}/opportunities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/{id}/opportunities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdOpportunitiesEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdOpportunitiesEndpoint.py index 400ca849c..d93cec2b2 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdOpportunitiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsIdOpportunitiesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsIdOpportunitiesCountEndpoint import \ - MarketingCampaignsIdOpportunitiesCountEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsIdOpportunitiesCountEndpoint import ( + MarketingCampaignsIdOpportunitiesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityReference]: """ Performs a GET request against the /marketing/campaigns/{id}/opportunities endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityReference]: The parsed response data. """ - return self._parse_many(OpportunityReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesCountEndpoint.py index b4a8f64eb..809b8d2e3 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsStatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/statuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/statuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesEndpoint.py index 1b199eb7d..9dee3f767 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsStatusesCountEndpoint import \ - MarketingCampaignsStatusesCountEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsStatusesIdEndpoint import MarketingCampaignsStatusesIdEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsStatusesCountEndpoint import ( + MarketingCampaignsStatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsStatusesIdEndpoint import ( + MarketingCampaignsStatusesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CampaignStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CampaignStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CampaignStatus]: """ Performs a GET request against the /marketing/campaigns/statuses endpoint. @@ -63,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CampaignStatus]: The parsed response data. """ - return self._parse_many(CampaignStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CampaignStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignStatus: """ Performs a POST request against the /marketing/campaigns/statuses endpoint. @@ -75,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CampaignStatus: The parsed response data. """ - return self._parse_one(CampaignStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CampaignStatus, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesIdEndpoint.py index bf4fa223f..475354bac 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsStatusesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignStatus: """ Performs a GET request against the /marketing/campaigns/statuses/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignStatus: The parsed response data. """ - return self._parse_one(CampaignStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CampaignStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/campaigns/statuses/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignStatus: """ Performs a PUT request against the /marketing/campaigns/statuses/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignStatus: The parsed response data. """ - return self._parse_one(CampaignStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CampaignStatus, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignStatus: """ Performs a PATCH request against the /marketing/campaigns/statuses/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CampaignStatus: The parsed response data. """ - return self._parse_one(CampaignStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CampaignStatus, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesCountEndpoint.py index 66dc82b90..0bfb4483d 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsSubtypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/subTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/subTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesEndpoint.py index 19fbad081..05583511e 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsSubtypesCountEndpoint import \ - MarketingCampaignsSubtypesCountEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsSubtypesIdEndpoint import MarketingCampaignsSubtypesIdEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsSubtypesCountEndpoint import ( + MarketingCampaignsSubtypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsSubtypesIdEndpoint import ( + MarketingCampaignsSubtypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage.Campaign.SubType import CampaignSubType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CampaignSubType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CampaignSubType]: """ Performs a GET request against the /marketing/campaigns/subTypes endpoint. @@ -63,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CampaignSubType]: The parsed response data. """ - return self._parse_many(CampaignSubType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CampaignSubType, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignSubType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignSubType: """ Performs a POST request against the /marketing/campaigns/subTypes endpoint. @@ -75,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CampaignSubType: The parsed response data. """ - return self._parse_one(CampaignSubType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CampaignSubType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesIdEndpoint.py index f70d5e092..1f8565a14 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsSubTypesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignSubType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignSubType: """ Performs a GET request against the /marketing/campaigns/subTypes/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignSubType: The parsed response data. """ - return self._parse_one(CampaignSubType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CampaignSubType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/campaigns/subTypes/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignSubType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignSubType: """ Performs a PUT request against the /marketing/campaigns/subTypes/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignSubType: The parsed response data. """ - return self._parse_one(CampaignSubType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CampaignSubType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignSubType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignSubType: """ Performs a PATCH request against the /marketing/campaigns/subTypes/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CampaignSubType: The parsed response data. """ - return self._parse_one(CampaignSubType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CampaignSubType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesCountEndpoint.py index 706374016..c98070aaa 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesEndpoint.py index fe2eb016d..82616daf6 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsTypesCountEndpoint import MarketingCampaignsTypesCountEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdEndpoint import MarketingCampaignsTypesIdEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsTypesInfoEndpoint import MarketingCampaignsTypesInfoEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsTypesCountEndpoint import ( + MarketingCampaignsTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdEndpoint import ( + MarketingCampaignsTypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsTypesInfoEndpoint import ( + MarketingCampaignsTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CampaignType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class MarketingCampaignsTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(MarketingCampaignsTypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(MarketingCampaignsTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + MarketingCampaignsTypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + MarketingCampaignsTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> MarketingCampaignsTypesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CampaignType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CampaignType]: """ Performs a GET request against the /marketing/campaigns/types endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CampaignType]: The parsed response data. """ - return self._parse_many(CampaignType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CampaignType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignType: """ Performs a POST request against the /marketing/campaigns/types endpoint. @@ -74,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CampaignType: The parsed response data. """ - return self._parse_one(CampaignType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CampaignType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdEndpoint.py index d80557ac5..d71ed434a 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdInfoEndpoint import MarketingCampaignsTypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdSubtypesEndpoint import \ - MarketingCampaignsTypesIdSubtypesEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdInfoEndpoint import ( + MarketingCampaignsTypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdSubtypesEndpoint import ( + MarketingCampaignsTypesIdSubtypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CampaignType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +16,12 @@ class MarketingCampaignsTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(MarketingCampaignsTypesIdInfoEndpoint(client, parent_endpoint=self)) self.sub_types = self._register_child_endpoint( MarketingCampaignsTypesIdSubtypesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + MarketingCampaignsTypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -41,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignType: """ Performs a GET request against the /marketing/campaigns/types/{id} endpoint. @@ -51,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignType: The parsed response data. """ - return self._parse_one(CampaignType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CampaignType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/campaigns/types/{id} endpoint. @@ -63,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignType: """ Performs a PUT request against the /marketing/campaigns/types/{id} endpoint. @@ -75,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignType: The parsed response data. """ - return self._parse_one(CampaignType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CampaignType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignType: """ Performs a PATCH request against the /marketing/campaigns/types/{id} endpoint. @@ -87,4 +107,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CampaignType: The parsed response data. """ - return self._parse_one(CampaignType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CampaignType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdInfoEndpoint.py index be5051f17..dead48085 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignTypeInfo: """ Performs a GET request against the /marketing/campaigns/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignTypeInfo: The parsed response data. """ - return self._parse_one(CampaignTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CampaignTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesCountEndpoint.py index 1bcd16ea1..f3921164e 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsTypesIdSubtypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/types/{id}/subTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/types/{id}/subTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesEndpoint.py index 7f621f4c1..99bab795a 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdSubtypesCountEndpoint import \ - MarketingCampaignsTypesIdSubtypesCountEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdSubtypesIdEndpoint import \ - MarketingCampaignsTypesIdSubtypesIdEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdSubtypesCountEndpoint import ( + MarketingCampaignsTypesIdSubtypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingCampaignsTypesIdSubtypesIdEndpoint import ( + MarketingCampaignsTypesIdSubtypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage.Type.SubType import CampaignSubType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> MarketingCampaignsTypesIdSubtypesIdEndpoint: Returns: MarketingCampaignsTypesIdSubtypesIdEndpoint: The initialized MarketingCampaignsTypesIdSubtypesIdEndpoint object. """ - child = MarketingCampaignsTypesIdSubtypesIdEndpoint(self.client, parent_endpoint=self) + child = MarketingCampaignsTypesIdSubtypesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CampaignSubType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CampaignSubType]: """ Performs a GET request against the /marketing/campaigns/types/{id}/subTypes endpoint. @@ -64,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CampaignSubType]: The parsed response data. """ - return self._parse_many(CampaignSubType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CampaignSubType, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesIdEndpoint.py index d08010c52..c0fd4c282 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesIdSubTypesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CampaignSubType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CampaignSubType: """ Performs a GET request against the /marketing/campaigns/types/{id}/subTypes/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CampaignSubType: The parsed response data. """ - return self._parse_one(CampaignSubType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CampaignSubType, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesInfoCountEndpoint.py index 4e914a462..62c8c9c61 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingCampaignsTypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/campaigns/types/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/campaigns/types/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesInfoEndpoint.py index d829e5d63..1498dede4 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingCampaignsTypesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsTypesInfoCountEndpoint import \ - MarketingCampaignsTypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsTypesInfoCountEndpoint import ( + MarketingCampaignsTypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CampaignTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CampaignTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CampaignTypeInfo]: """ Performs a GET request against the /marketing/campaigns/types/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CampaignTypeInfo]: The parsed response data. """ - return self._parse_many(CampaignTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CampaignTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingEndpoint.py index be016486d..80fbfcc3e 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingCampaignsEndpoint import MarketingCampaignsEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsEndpoint import MarketingGroupsEndpoint +from pyconnectwise.endpoints.manage.MarketingCampaignsEndpoint import ( + MarketingCampaignsEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingGroupsEndpoint import ( + MarketingGroupsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,5 +15,9 @@ class MarketingEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "marketing", parent_endpoint=parent_endpoint) - self.campaigns = self._register_child_endpoint(MarketingCampaignsEndpoint(client, parent_endpoint=self)) - self.groups = self._register_child_endpoint(MarketingGroupsEndpoint(client, parent_endpoint=self)) + self.groups = self._register_child_endpoint( + MarketingGroupsEndpoint(client, parent_endpoint=self) + ) + self.campaigns = self._register_child_endpoint( + MarketingCampaignsEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsCountEndpoint.py index a2cd4adff..c80e58631 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingGroupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/groups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/groups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsEndpoint.py index 8beb27934..552730cb5 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsCountEndpoint import MarketingGroupsCountEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdEndpoint import MarketingGroupsIdEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsInfoEndpoint import MarketingGroupsInfoEndpoint +from pyconnectwise.endpoints.manage.MarketingGroupsCountEndpoint import ( + MarketingGroupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingGroupsIdEndpoint import ( + MarketingGroupsIdEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingGroupsInfoEndpoint import ( + MarketingGroupsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Group from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class MarketingGroupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "groups", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(MarketingGroupsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(MarketingGroupsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + MarketingGroupsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + MarketingGroupsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> MarketingGroupsIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> MarketingGroupsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Group]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Group]: """ Performs a GET request against the /marketing/groups endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Group]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Group]: """ Performs a GET request against the /marketing/groups endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Group]: The parsed response data. """ - return self._parse_many(Group, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Group, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Group: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Group: """ Performs a POST request against the /marketing/groups endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Group: The parsed response data. """ - return self._parse_one(Group, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Group, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdCompaniesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdCompaniesCountEndpoint.py index fd4268d19..8b0295a1a 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdCompaniesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdCompaniesCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingGroupsIdCompaniesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/groups/{id}/companies/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/groups/{id}/companies/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdCompaniesEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdCompaniesEndpoint.py index 079fd15e5..e38ca9d5e 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdCompaniesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdCompaniesEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdCompaniesCountEndpoint import \ - MarketingGroupsIdCompaniesCountEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdCompaniesIdEndpoint import MarketingGroupsIdCompaniesIdEndpoint +from pyconnectwise.endpoints.manage.MarketingGroupsIdCompaniesCountEndpoint import ( + MarketingGroupsIdCompaniesCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingGroupsIdCompaniesIdEndpoint import ( + MarketingGroupsIdCompaniesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MarketingCompany from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MarketingCompany]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MarketingCompany]: """ Performs a GET request against the /marketing/groups/{id}/companies endpoint. @@ -63,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MarketingCompany]: The parsed response data. """ - return self._parse_many(MarketingCompany, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MarketingCompany, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketingCompany: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketingCompany: """ Performs a POST request against the /marketing/groups/{id}/companies endpoint. @@ -75,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MarketingCompany: The parsed response data. """ - return self._parse_one(MarketingCompany, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MarketingCompany, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsCountEndpoint.py index 897a104f5..2d79399ec 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingGroupsIdContactsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/groups/{id}/contacts/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/groups/{id}/contacts/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsEndpoint.py index 5db85a424..56d2e5b30 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdContactsCountEndpoint import MarketingGroupsIdContactsCountEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdContactsIdEndpoint import MarketingGroupsIdContactsIdEndpoint +from pyconnectwise.endpoints.manage.MarketingGroupsIdContactsCountEndpoint import ( + MarketingGroupsIdContactsCountEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingGroupsIdContactsIdEndpoint import ( + MarketingGroupsIdContactsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MarketingContact from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class MarketingGroupsIdContactsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "contacts", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(MarketingGroupsIdContactsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + MarketingGroupsIdContactsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> MarketingGroupsIdContactsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MarketingContact]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MarketingContact]: """ Performs a GET request against the /marketing/groups/{id}/contacts endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MarketingContact]: The parsed response data. """ - return self._parse_many(MarketingContact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MarketingContact, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketingContact: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketingContact: """ Performs a POST request against the /marketing/groups/{id}/contacts endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MarketingContact: The parsed response data. """ - return self._parse_one(MarketingContact, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MarketingContact, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsIdEndpoint.py index b4db72b02..06d7dde5c 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdContactsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketingContact: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketingContact: """ Performs a GET request against the /marketing/groups/{id}/contacts/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MarketingContact: The parsed response data. """ - return self._parse_one(MarketingContact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MarketingContact, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/groups/{id}/contacts/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketingContact: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketingContact: """ Performs a PUT request against the /marketing/groups/{id}/contacts/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MarketingContact: The parsed response data. """ - return self._parse_one(MarketingContact, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MarketingContact, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketingContact: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketingContact: """ Performs a PATCH request against the /marketing/groups/{id}/contacts/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MarketingContact: The parsed response data. """ - return self._parse_one(MarketingContact, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MarketingContact, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdEndpoint.py index 0ee2a9cd1..e6261ac90 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdEndpoint.py @@ -1,10 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdCompaniesEndpoint import MarketingGroupsIdCompaniesEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdContactsEndpoint import MarketingGroupsIdContactsEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdInfoEndpoint import MarketingGroupsIdInfoEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdUsagesEndpoint import MarketingGroupsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.MarketingGroupsIdCompaniesEndpoint import ( + MarketingGroupsIdCompaniesEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingGroupsIdContactsEndpoint import ( + MarketingGroupsIdContactsEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingGroupsIdInfoEndpoint import ( + MarketingGroupsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.MarketingGroupsIdUsagesEndpoint import ( + MarketingGroupsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Group from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,12 +22,22 @@ class MarketingGroupsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(MarketingGroupsIdInfoEndpoint(client, parent_endpoint=self)) - self.contacts = self._register_child_endpoint(MarketingGroupsIdContactsEndpoint(client, parent_endpoint=self)) - self.companies = self._register_child_endpoint(MarketingGroupsIdCompaniesEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(MarketingGroupsIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + MarketingGroupsIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.contacts = self._register_child_endpoint( + MarketingGroupsIdContactsEndpoint(client, parent_endpoint=self) + ) + self.companies = self._register_child_endpoint( + MarketingGroupsIdCompaniesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + MarketingGroupsIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Group]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Group]: """ Performs a GET request against the /marketing/groups/{id} endpoint and returns an initialized PaginatedResponse object. @@ -40,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Group: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Group: """ Performs a GET request against the /marketing/groups/{id} endpoint. @@ -50,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: Group: The parsed response data. """ - return self._parse_one(Group, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Group, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /marketing/groups/{id} endpoint. @@ -62,9 +86,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Group: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Group: """ Performs a PUT request against the /marketing/groups/{id} endpoint. @@ -74,9 +103,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: Group: The parsed response data. """ - return self._parse_one(Group, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Group, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Group: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Group: """ Performs a PATCH request against the /marketing/groups/{id} endpoint. @@ -86,4 +119,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Group: The parsed response data. """ - return self._parse_one(Group, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Group, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdInfoEndpoint.py index 6264e54b5..d9ec553b3 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdInfoEndpoint.py @@ -10,7 +10,9 @@ class MarketingGroupsIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[GroupInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[GroupInfo]: """ Performs a GET request against the /marketing/groups/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GroupInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GroupInfo: """ Performs a GET request against the /marketing/groups/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GroupInfo: The parsed response data. """ - return self._parse_one(GroupInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GroupInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdUsagesEndpoint.py index e503e477c..e8756e400 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsIdUsagesListEndpoint import MarketingGroupsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.MarketingGroupsIdUsagesListEndpoint import ( + MarketingGroupsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class MarketingGroupsIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(MarketingGroupsIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + MarketingGroupsIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /marketing/groups/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /marketing/groups/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdUsagesListEndpoint.py index 5150e035f..1d99a0995 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class MarketingGroupsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /marketing/groups/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /marketing/groups/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsInfoCountEndpoint.py index 8138dd457..8694f62d8 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class MarketingGroupsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /marketing/groups/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /marketing/groups/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/MarketingGroupsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/MarketingGroupsInfoEndpoint.py index adab9f33f..df83808fe 100644 --- a/src/pyconnectwise/endpoints/manage/MarketingGroupsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/MarketingGroupsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.MarketingGroupsInfoCountEndpoint import MarketingGroupsInfoCountEndpoint +from pyconnectwise.endpoints.manage.MarketingGroupsInfoCountEndpoint import ( + MarketingGroupsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import GroupInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class MarketingGroupsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(MarketingGroupsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + MarketingGroupsInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[GroupInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[GroupInfo]: """ Performs a GET request against the /marketing/groups/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[GroupInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[GroupInfo]: """ Performs a GET request against the /marketing/groups/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[GroupInfo]: The parsed response data. """ - return self._parse_many(GroupInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + GroupInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsCountEndpoint.py index 80f24575e..f25c88f30 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementAdjustmentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/adjustments/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/adjustments/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsEndpoint.py index 21b7a16ff..d13692865 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsCountEndpoint import ProcurementAdjustmentsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsIdEndpoint import ProcurementAdjustmentsIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesEndpoint import ProcurementAdjustmentsTypesEndpoint +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsCountEndpoint import ( + ProcurementAdjustmentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsIdEndpoint import ( + ProcurementAdjustmentsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesEndpoint import ( + ProcurementAdjustmentsTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProcurementAdjustment from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementAdjustmentsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "adjustments", parent_endpoint=parent_endpoint) - self.types = self._register_child_endpoint(ProcurementAdjustmentsTypesEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementAdjustmentsCountEndpoint(client, parent_endpoint=self)) + self.types = self._register_child_endpoint( + ProcurementAdjustmentsTypesEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + ProcurementAdjustmentsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementAdjustmentsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProcurementAdjustment]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProcurementAdjustment]: """ Performs a GET request against the /procurement/adjustments endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProcurementAdjustment]: The parsed response data. """ - return self._parse_many(ProcurementAdjustment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProcurementAdjustment, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProcurementAdjustment: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProcurementAdjustment: """ Performs a POST request against the /procurement/adjustments endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProcurementAdjustment: The parsed response data. """ - return self._parse_one(ProcurementAdjustment, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProcurementAdjustment, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsCountEndpoint.py index 75419ecb9..d04980a3d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementAdjustmentsIdDetailsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/adjustments/{id}/details/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/adjustments/{id}/details/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsEndpoint.py index c8fcf1148..325c5fa9d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsIdDetailsCountEndpoint import \ - ProcurementAdjustmentsIdDetailsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsIdDetailsIdEndpoint import \ - ProcurementAdjustmentsIdDetailsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsIdDetailsCountEndpoint import ( + ProcurementAdjustmentsIdDetailsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsIdDetailsIdEndpoint import ( + ProcurementAdjustmentsIdDetailsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AdjustmentDetail from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ProcurementAdjustmentsIdDetailsIdEndpoint: Returns: ProcurementAdjustmentsIdDetailsIdEndpoint: The initialized ProcurementAdjustmentsIdDetailsIdEndpoint object. """ - child = ProcurementAdjustmentsIdDetailsIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementAdjustmentsIdDetailsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AdjustmentDetail]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AdjustmentDetail]: """ Performs a GET request against the /procurement/adjustments/{id}/details endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AdjustmentDetail]: The parsed response data. """ - return self._parse_many(AdjustmentDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AdjustmentDetail, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AdjustmentDetail: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AdjustmentDetail: """ Performs a POST request against the /procurement/adjustments/{id}/details endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AdjustmentDetail: The parsed response data. """ - return self._parse_one(AdjustmentDetail, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AdjustmentDetail, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsIdEndpoint.py index 40d1d6ed0..047a7c2f3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdDetailsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AdjustmentDetail: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AdjustmentDetail: """ Performs a GET request against the /procurement/adjustments/{id}/details/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AdjustmentDetail: The parsed response data. """ - return self._parse_one(AdjustmentDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AdjustmentDetail, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/adjustments/{id}/details/{id} endpoint. @@ -55,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdEndpoint.py index 5d91c61f3..069507346 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsIdDetailsEndpoint import \ - ProcurementAdjustmentsIdDetailsEndpoint +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsIdDetailsEndpoint import ( + ProcurementAdjustmentsIdDetailsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProcurementAdjustment from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProcurementAdjustment: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProcurementAdjustment: """ Performs a GET request against the /procurement/adjustments/{id} endpoint. @@ -49,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProcurementAdjustment: The parsed response data. """ - return self._parse_one(ProcurementAdjustment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProcurementAdjustment, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/adjustments/{id} endpoint. @@ -61,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProcurementAdjustment: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProcurementAdjustment: """ Performs a PUT request against the /procurement/adjustments/{id} endpoint. @@ -73,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProcurementAdjustment: The parsed response data. """ - return self._parse_one(ProcurementAdjustment, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProcurementAdjustment, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProcurementAdjustment: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProcurementAdjustment: """ Performs a PATCH request against the /procurement/adjustments/{id} endpoint. @@ -85,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProcurementAdjustment: The parsed response data. """ - return self._parse_one(ProcurementAdjustment, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProcurementAdjustment, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesCountEndpoint.py index 88a865a2c..e375f165f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementAdjustmentsTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/adjustments/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/adjustments/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesEndpoint.py index 124ab78d4..7c8ed5da9 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesEndpoint.py @@ -1,11 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesCountEndpoint import \ - ProcurementAdjustmentsTypesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesIdEndpoint import ProcurementAdjustmentsTypesIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesInfoEndpoint import \ - ProcurementAdjustmentsTypesInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesCountEndpoint import ( + ProcurementAdjustmentsTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesIdEndpoint import ( + ProcurementAdjustmentsTypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesInfoEndpoint import ( + ProcurementAdjustmentsTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AdjustmentType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,10 +19,12 @@ class ProcurementAdjustmentsTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementAdjustmentsTypesInfoEndpoint(client, parent_endpoint=self)) self.count = self._register_child_endpoint( ProcurementAdjustmentsTypesCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ProcurementAdjustmentsTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementAdjustmentsTypesIdEndpoint: """ @@ -56,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AdjustmentType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AdjustmentType]: """ Performs a GET request against the /procurement/adjustments/types endpoint. @@ -66,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AdjustmentType]: The parsed response data. """ - return self._parse_many(AdjustmentType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AdjustmentType, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AdjustmentType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AdjustmentType: """ Performs a POST request against the /procurement/adjustments/types endpoint. @@ -78,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AdjustmentType: The parsed response data. """ - return self._parse_one(AdjustmentType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AdjustmentType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdEndpoint.py index 047d2970e..9860c5dfa 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesIdInfoEndpoint import \ - ProcurementAdjustmentsTypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesIdUsagesEndpoint import \ - ProcurementAdjustmentsTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesIdInfoEndpoint import ( + ProcurementAdjustmentsTypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesIdUsagesEndpoint import ( + ProcurementAdjustmentsTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AdjustmentType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,12 +16,12 @@ class ProcurementAdjustmentsTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - ProcurementAdjustmentsTypesIdInfoEndpoint(client, parent_endpoint=self) - ) self.usages = self._register_child_endpoint( ProcurementAdjustmentsTypesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ProcurementAdjustmentsTypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -44,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AdjustmentType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AdjustmentType: """ Performs a GET request against the /procurement/adjustments/types/{id} endpoint. @@ -54,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AdjustmentType: The parsed response data. """ - return self._parse_one(AdjustmentType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AdjustmentType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/adjustments/types/{id} endpoint. @@ -66,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AdjustmentType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AdjustmentType: """ Performs a PUT request against the /procurement/adjustments/types/{id} endpoint. @@ -78,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AdjustmentType: The parsed response data. """ - return self._parse_one(AdjustmentType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AdjustmentType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AdjustmentType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AdjustmentType: """ Performs a PATCH request against the /procurement/adjustments/types/{id} endpoint. @@ -90,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AdjustmentType: The parsed response data. """ - return self._parse_one(AdjustmentType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AdjustmentType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdInfoEndpoint.py index 34d21dec4..a1db376f3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AdjustmentTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AdjustmentTypeInfo: """ Performs a GET request against the /procurement/adjustments/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AdjustmentTypeInfo: The parsed response data. """ - return self._parse_one(AdjustmentTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AdjustmentTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdUsagesEndpoint.py index fa0b09fb9..f017b623d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesIdUsagesListEndpoint import \ - ProcurementAdjustmentsTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesIdUsagesListEndpoint import ( + ProcurementAdjustmentsTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +14,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) self.list = self._register_child_endpoint( - ProcurementAdjustmentsTypesIdUsagesListEndpoint(client, parent_endpoint=self) + ProcurementAdjustmentsTypesIdUsagesListEndpoint( + client, parent_endpoint=self + ) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/adjustments/types/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +42,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/adjustments/types/{id}/usages endpoint. @@ -47,4 +54,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdUsagesListEndpoint.py index 3bdb72b3a..743def3ef 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ProcurementAdjustmentsTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/adjustments/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/adjustments/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesInfoCountEndpoint.py index 2888e06da..525b775f8 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementAdjustmentsTypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/adjustments/types/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/adjustments/types/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesInfoEndpoint.py index 713b6ab4f..7e4ab3b3d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementAdjustmentsTypesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesInfoCountEndpoint import \ - ProcurementAdjustmentsTypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsTypesInfoCountEndpoint import ( + ProcurementAdjustmentsTypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AdjustmentTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AdjustmentTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AdjustmentTypeInfo]: """ Performs a GET request against the /procurement/adjustments/types/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AdjustmentTypeInfo]: The parsed response data. """ - return self._parse_many(AdjustmentTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AdjustmentTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogCountEndpoint.py index 5c55483d9..cf25ff1f7 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCatalogCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/catalog/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/catalog/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogEndpoint.py index 7f13dd056..639679794 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogCountEndpoint import ProcurementCatalogCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdEndpoint import ProcurementCatalogIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogInfoEndpoint import ProcurementCatalogInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementCatalogCountEndpoint import ( + ProcurementCatalogCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogIdEndpoint import ( + ProcurementCatalogIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogInfoEndpoint import ( + ProcurementCatalogInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CatalogItem from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementCatalogEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "catalog", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementCatalogInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementCatalogCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementCatalogCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementCatalogInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementCatalogIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ProcurementCatalogIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CatalogItem]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CatalogItem]: """ Performs a GET request against the /procurement/catalog endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CatalogItem]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CatalogItem]: """ Performs a GET request against the /procurement/catalog endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CatalogItem]: The parsed response data. """ - return self._parse_many(CatalogItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CatalogItem, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogItem: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogItem: """ Performs a POST request against the /procurement/catalog endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CatalogItem: The parsed response data. """ - return self._parse_one(CatalogItem, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CatalogItem, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsCountEndpoint.py index 247d5cfd5..66a0c31da 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCatalogIdComponentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/catalog/{id}/components/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/catalog/{id}/components/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsEndpoint.py index 6a29d21a0..d5d71987f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdComponentsCountEndpoint import \ - ProcurementCatalogIdComponentsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdComponentsIdEndpoint import \ - ProcurementCatalogIdComponentsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementCatalogIdComponentsCountEndpoint import ( + ProcurementCatalogIdComponentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogIdComponentsIdEndpoint import ( + ProcurementCatalogIdComponentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CatalogComponent from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ProcurementCatalogIdComponentsIdEndpoint: Returns: ProcurementCatalogIdComponentsIdEndpoint: The initialized ProcurementCatalogIdComponentsIdEndpoint object. """ - child = ProcurementCatalogIdComponentsIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementCatalogIdComponentsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CatalogComponent]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CatalogComponent]: """ Performs a GET request against the /procurement/catalog/{id}/components endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CatalogComponent]: The parsed response data. """ - return self._parse_many(CatalogComponent, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CatalogComponent, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogComponent: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogComponent: """ Performs a POST request against the /procurement/catalog/{id}/components endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CatalogComponent: The parsed response data. """ - return self._parse_one(CatalogComponent, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CatalogComponent, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsIdEndpoint.py index 9409fd9a3..6c13ecb18 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdComponentsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogComponent: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogComponent: """ Performs a GET request against the /procurement/catalog/{id}/components/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CatalogComponent: The parsed response data. """ - return self._parse_one(CatalogComponent, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CatalogComponent, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/catalog/{id}/components/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogComponent: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogComponent: """ Performs a PUT request against the /procurement/catalog/{id}/components/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CatalogComponent: The parsed response data. """ - return self._parse_one(CatalogComponent, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CatalogComponent, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogComponent: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogComponent: """ Performs a PATCH request against the /procurement/catalog/{id}/components/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CatalogComponent: The parsed response data. """ - return self._parse_one(CatalogComponent, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CatalogComponent, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdEndpoint.py index f271bbd3a..f0e303692 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdEndpoint.py @@ -1,14 +1,24 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdComponentsEndpoint import ProcurementCatalogIdComponentsEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdInfoEndpoint import ProcurementCatalogIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdInventoryEndpoint import ProcurementCatalogIdInventoryEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdMinimumstockbywarehouseEndpoint import \ - ProcurementCatalogIdMinimumstockbywarehouseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdPricingEndpoint import ProcurementCatalogIdPricingEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdQuantityonhandEndpoint import \ - ProcurementCatalogIdQuantityonhandEndpoint +from pyconnectwise.endpoints.manage.ProcurementCatalogIdComponentsEndpoint import ( + ProcurementCatalogIdComponentsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogIdInfoEndpoint import ( + ProcurementCatalogIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogIdInventoryEndpoint import ( + ProcurementCatalogIdInventoryEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogIdMinimumstockbywarehouseEndpoint import ( + ProcurementCatalogIdMinimumstockbywarehouseEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogIdPricingEndpoint import ( + ProcurementCatalogIdPricingEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogIdQuantityonhandEndpoint import ( + ProcurementCatalogIdQuantityonhandEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CatalogItem from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -18,22 +28,30 @@ class ProcurementCatalogIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementCatalogIdInfoEndpoint(client, parent_endpoint=self)) self.inventory = self._register_child_endpoint( ProcurementCatalogIdInventoryEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ProcurementCatalogIdInfoEndpoint(client, parent_endpoint=self) + ) + self.components = self._register_child_endpoint( + ProcurementCatalogIdComponentsEndpoint(client, parent_endpoint=self) + ) self.quantity_on_hand = self._register_child_endpoint( ProcurementCatalogIdQuantityonhandEndpoint(client, parent_endpoint=self) ) - self.minimum_stock_by_warehouse = self._register_child_endpoint( - ProcurementCatalogIdMinimumstockbywarehouseEndpoint(client, parent_endpoint=self) + self.pricing = self._register_child_endpoint( + ProcurementCatalogIdPricingEndpoint(client, parent_endpoint=self) ) - self.components = self._register_child_endpoint( - ProcurementCatalogIdComponentsEndpoint(client, parent_endpoint=self) + self.minimum_stock_by_warehouse = self._register_child_endpoint( + ProcurementCatalogIdMinimumstockbywarehouseEndpoint( + client, parent_endpoint=self + ) ) - self.pricing = self._register_child_endpoint(ProcurementCatalogIdPricingEndpoint(client, parent_endpoint=self)) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CatalogItem]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CatalogItem]: """ Performs a GET request against the /procurement/catalog/{id} endpoint and returns an initialized PaginatedResponse object. @@ -54,7 +72,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogItem: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogItem: """ Performs a GET request against the /procurement/catalog/{id} endpoint. @@ -64,9 +84,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CatalogItem: The parsed response data. """ - return self._parse_one(CatalogItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CatalogItem, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/catalog/{id} endpoint. @@ -76,9 +100,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogItem: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogItem: """ Performs a PUT request against the /procurement/catalog/{id} endpoint. @@ -88,9 +117,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CatalogItem: The parsed response data. """ - return self._parse_one(CatalogItem, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CatalogItem, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogItem: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogItem: """ Performs a PATCH request against the /procurement/catalog/{id} endpoint. @@ -100,4 +133,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CatalogItem: The parsed response data. """ - return self._parse_one(CatalogItem, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CatalogItem, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInfoEndpoint.py index 1964af090..286afa17d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogItemInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogItemInfo: """ Performs a GET request against the /procurement/catalog/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CatalogItemInfo: The parsed response data. """ - return self._parse_one(CatalogItemInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CatalogItemInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryCountEndpoint.py index 1bed36e26..23e894714 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCatalogIdInventoryCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/catalog/{id}/inventory/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/catalog/{id}/inventory/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryEndpoint.py index 83a5c368b..82ec18d70 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdInventoryCountEndpoint import \ - ProcurementCatalogIdInventoryCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdInventoryIdEndpoint import \ - ProcurementCatalogIdInventoryIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementCatalogIdInventoryCountEndpoint import ( + ProcurementCatalogIdInventoryCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogIdInventoryIdEndpoint import ( + ProcurementCatalogIdInventoryIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CatalogInventory from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ProcurementCatalogIdInventoryIdEndpoint: Returns: ProcurementCatalogIdInventoryIdEndpoint: The initialized ProcurementCatalogIdInventoryIdEndpoint object. """ - child = ProcurementCatalogIdInventoryIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementCatalogIdInventoryIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CatalogInventory]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CatalogInventory]: """ Performs a GET request against the /procurement/catalog/{id}/inventory endpoint. @@ -64,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CatalogInventory]: The parsed response data. """ - return self._parse_many(CatalogInventory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CatalogInventory, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryIdEndpoint.py index d8b468ac0..01fdc82c4 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdInventoryIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogInventory: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogInventory: """ Performs a GET request against the /procurement/catalog/{id}/inventory/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CatalogInventory: The parsed response data. """ - return self._parse_one(CatalogInventory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CatalogInventory, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseCountEndpoint.py index cae2223dd..cf36d5abe 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCatalogIdMinimumstockbywarehouseCountEndpoint(ConnectWiseEndpoi def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/catalog/{id}/minimumStockByWarehouse/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/catalog/{id}/minimumStockByWarehouse/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseEndpoint.py index f8990d428..a2b6cf55e 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdMinimumstockbywarehouseCountEndpoint import \ - ProcurementCatalogIdMinimumstockbywarehouseCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint import \ - ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementCatalogIdMinimumstockbywarehouseCountEndpoint import ( + ProcurementCatalogIdMinimumstockbywarehouseCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint import ( + ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MinimumStockByWarehouse from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class ProcurementCatalogIdMinimumstockbywarehouseEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "minimumStockByWarehouse", parent_endpoint=parent_endpoint) + super().__init__( + client, "minimumStockByWarehouse", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - ProcurementCatalogIdMinimumstockbywarehouseCountEndpoint(client, parent_endpoint=self) + ProcurementCatalogIdMinimumstockbywarehouseCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint: Returns: ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint: The initialized ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint object. """ - child = ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementCatalogIdMinimumstockbywarehouseIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MinimumStockByWarehouse]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MinimumStockByWarehouse]: """ Performs a GET request against the /procurement/catalog/{id}/minimumStockByWarehouse endpoint. @@ -64,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MinimumStockByWarehouse]: The parsed response data. """ - return self._parse_many(MinimumStockByWarehouse, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MinimumStockByWarehouse, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MinimumStockByWarehouse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MinimumStockByWarehouse: """ Performs a POST request against the /procurement/catalog/{id}/minimumStockByWarehouse endpoint. @@ -76,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MinimumStockByWarehouse: The parsed response data. """ - return self._parse_one(MinimumStockByWarehouse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MinimumStockByWarehouse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseIdEndpoint.py index 8b88ead37..27c8c98f2 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdMinimumStockByWarehouseIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MinimumStockByWarehouse: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MinimumStockByWarehouse: """ Performs a GET request against the /procurement/catalog/{id}/minimumStockByWarehouse/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MinimumStockByWarehouse: The parsed response data. """ - return self._parse_one(MinimumStockByWarehouse, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MinimumStockByWarehouse, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/catalog/{id}/minimumStockByWarehouse/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MinimumStockByWarehouse: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MinimumStockByWarehouse: """ Performs a PUT request against the /procurement/catalog/{id}/minimumStockByWarehouse/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MinimumStockByWarehouse: The parsed response data. """ - return self._parse_one(MinimumStockByWarehouse, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MinimumStockByWarehouse, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MinimumStockByWarehouse: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MinimumStockByWarehouse: """ Performs a PATCH request against the /procurement/catalog/{id}/minimumStockByWarehouse/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MinimumStockByWarehouse: The parsed response data. """ - return self._parse_one(MinimumStockByWarehouse, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MinimumStockByWarehouse, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdPricingEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdPricingEndpoint.py index 931c78041..19512551f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdPricingEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdPricingEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCatalogIdPricingEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "pricing", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CatalogPricing: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CatalogPricing: """ Performs a POST request against the /procurement/catalog/{id}/pricing endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CatalogPricing: The parsed response data. """ - return self._parse_one(CatalogPricing, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CatalogPricing, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdQuantityonhandEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdQuantityonhandEndpoint.py index 984f74329..190936d4b 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdQuantityonhandEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogIdQuantityonhandEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCatalogIdQuantityonhandEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "quantityOnHand", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/catalog/{id}/quantityOnHand endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/catalog/{id}/quantityOnHand endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogInfoCountEndpoint.py index cb2b183c8..b0ad1b90f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCatalogInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/catalog/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/catalog/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCatalogInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCatalogInfoEndpoint.py index 2352ec55e..24fa9cd01 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCatalogInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCatalogInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogInfoCountEndpoint import ProcurementCatalogInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementCatalogInfoCountEndpoint import ( + ProcurementCatalogInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CatalogItemInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProcurementCatalogInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProcurementCatalogInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementCatalogInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CatalogItemInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CatalogItemInfo]: """ Performs a GET request against the /procurement/catalog/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CatalogItemInfo]: The parsed response data. """ - return self._parse_many(CatalogItemInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CatalogItemInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesCountEndpoint.py index 23d0184f2..8ef47a4e2 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCategoriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/categories/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/categories/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesEndpoint.py index d20184fe9..d63f95d63 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesCountEndpoint import ProcurementCategoriesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesIdEndpoint import ProcurementCategoriesIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesInfoEndpoint import ProcurementCategoriesInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementCategoriesCountEndpoint import ( + ProcurementCategoriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCategoriesIdEndpoint import ( + ProcurementCategoriesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCategoriesInfoEndpoint import ( + ProcurementCategoriesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Category from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementCategoriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "categories", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementCategoriesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementCategoriesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementCategoriesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementCategoriesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementCategoriesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ProcurementCategoriesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Category]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Category]: """ Performs a GET request against the /procurement/categories endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Category]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Category]: """ Performs a GET request against the /procurement/categories endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Category]: The parsed response data. """ - return self._parse_many(Category, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Category, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Category: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Category: """ Performs a POST request against the /procurement/categories endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Category: The parsed response data. """ - return self._parse_one(Category, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Category, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdEndpoint.py index e160b7b4f..de3075b3f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesIdInfoEndpoint import ProcurementCategoriesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesEndpoint import \ - ProcurementCategoriesIdSubcategoriesEndpoint +from pyconnectwise.endpoints.manage.ProcurementCategoriesIdInfoEndpoint import ( + ProcurementCategoriesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesEndpoint import ( + ProcurementCategoriesIdSubcategoriesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Category from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,12 +16,16 @@ class ProcurementCategoriesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementCategoriesIdInfoEndpoint(client, parent_endpoint=self)) self.subcategories = self._register_child_endpoint( ProcurementCategoriesIdSubcategoriesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ProcurementCategoriesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Category]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Category]: """ Performs a GET request against the /procurement/categories/{id} endpoint and returns an initialized PaginatedResponse object. @@ -39,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Category: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Category: """ Performs a GET request against the /procurement/categories/{id} endpoint. @@ -49,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Category: The parsed response data. """ - return self._parse_one(Category, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Category, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/categories/{id} endpoint. @@ -61,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Category: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Category: """ Performs a PUT request against the /procurement/categories/{id} endpoint. @@ -73,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Category: The parsed response data. """ - return self._parse_one(Category, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Category, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Category: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Category: """ Performs a PATCH request against the /procurement/categories/{id} endpoint. @@ -85,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Category: The parsed response data. """ - return self._parse_one(Category, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Category, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdInfoEndpoint.py index 633009771..5ffc7b79a 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CategoryInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CategoryInfo: """ Performs a GET request against the /procurement/categories/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CategoryInfo: The parsed response data. """ - return self._parse_one(CategoryInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CategoryInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesCountEndpoint.py index 6b2d8850f..f0892fe6f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCategoriesIdSubcategoriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/categories/{id}/subcategories/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/categories/{id}/subcategories/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesEndpoint.py index ecaa30d29..dd0e0d79d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesCountEndpoint import \ - ProcurementCategoriesIdSubcategoriesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesIdEndpoint import \ - ProcurementCategoriesIdSubcategoriesIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesInfoEndpoint import \ - ProcurementCategoriesIdSubcategoriesInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesCountEndpoint import ( + ProcurementCategoriesIdSubcategoriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesIdEndpoint import ( + ProcurementCategoriesIdSubcategoriesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesInfoEndpoint import ( + ProcurementCategoriesIdSubcategoriesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,11 +18,15 @@ class ProcurementCategoriesIdSubcategoriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "subcategories", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - ProcurementCategoriesIdSubcategoriesInfoEndpoint(client, parent_endpoint=self) - ) self.count = self._register_child_endpoint( - ProcurementCategoriesIdSubcategoriesCountEndpoint(client, parent_endpoint=self) + ProcurementCategoriesIdSubcategoriesCountEndpoint( + client, parent_endpoint=self + ) + ) + self.info = self._register_child_endpoint( + ProcurementCategoriesIdSubcategoriesInfoEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementCategoriesIdSubcategoriesIdEndpoint: @@ -31,6 +38,8 @@ def id(self, id: int) -> ProcurementCategoriesIdSubcategoriesIdEndpoint: Returns: ProcurementCategoriesIdSubcategoriesIdEndpoint: The initialized ProcurementCategoriesIdSubcategoriesIdEndpoint object. """ - child = ProcurementCategoriesIdSubcategoriesIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementCategoriesIdSubcategoriesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesIdEndpoint.py index 83eddd9e6..d90d32441 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesIdInfoEndpoint import \ - ProcurementCategoriesIdSubcategoriesIdInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesIdInfoEndpoint import ( + ProcurementCategoriesIdSubcategoriesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LegacySubCategory from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.info = self._register_child_endpoint( - ProcurementCategoriesIdSubcategoriesIdInfoEndpoint(client, parent_endpoint=self) + ProcurementCategoriesIdSubcategoriesIdInfoEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LegacySubCategory: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LegacySubCategory: """ Performs a GET request against the /procurement/categories/{id}/subcategories/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LegacySubCategory: The parsed response data. """ - return self._parse_one(LegacySubCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LegacySubCategory, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/categories/{id}/subcategories/{id} endpoint. @@ -61,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LegacySubCategory: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LegacySubCategory: """ Performs a PUT request against the /procurement/categories/{id}/subcategories/{id} endpoint. @@ -73,9 +88,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LegacySubCategory: The parsed response data. """ - return self._parse_one(LegacySubCategory, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + LegacySubCategory, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LegacySubCategory: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LegacySubCategory: """ Performs a PATCH request against the /procurement/categories/{id}/subcategories/{id} endpoint. @@ -85,4 +105,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: LegacySubCategory: The parsed response data. """ - return self._parse_one(LegacySubCategory, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + LegacySubCategory, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesIdInfoEndpoint.py index e1fbf4d90..b4c937d82 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LegacySubCategoryInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LegacySubCategoryInfo: """ Performs a GET request against the /procurement/categories/{id}/subcategories/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LegacySubCategoryInfo: The parsed response data. """ - return self._parse_one(LegacySubCategoryInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LegacySubCategoryInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesInfoCountEndpoint.py index 8e0aef0ab..53c53b0b7 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCategoriesIdSubcategoriesInfoCountEndpoint(ConnectWiseEndpoint) def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/categories/{id}/subcategories/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/categories/{id}/subcategories/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesInfoEndpoint.py index 4ae14d23d..c055b5e20 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesIdSubcategoriesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesInfoCountEndpoint import \ - ProcurementCategoriesIdSubcategoriesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementCategoriesIdSubcategoriesInfoCountEndpoint import ( + ProcurementCategoriesIdSubcategoriesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LegacySubCategoryInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ProcurementCategoriesIdSubcategoriesInfoCountEndpoint(client, parent_endpoint=self) + ProcurementCategoriesIdSubcategoriesInfoCountEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LegacySubCategoryInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LegacySubCategoryInfo]: """ Performs a GET request against the /procurement/categories/{id}/subcategories/info endpoint. @@ -49,4 +54,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LegacySubCategoryInfo]: The parsed response data. """ - return self._parse_many(LegacySubCategoryInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LegacySubCategoryInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesInfoCountEndpoint.py index db1049d64..19b945e8d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementCategoriesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/categories/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/categories/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesInfoEndpoint.py index c5fa80bc2..c94ab2dd5 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementCategoriesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementCategoriesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesInfoCountEndpoint import ProcurementCategoriesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementCategoriesInfoCountEndpoint import ( + ProcurementCategoriesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CategoryInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProcurementCategoriesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProcurementCategoriesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementCategoriesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CategoryInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CategoryInfo]: """ Performs a GET request against the /procurement/categories/info endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CategoryInfo]: The parsed response data. """ - return self._parse_many(CategoryInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CategoryInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsCountEndpoint.py index 2a166b80d..724c53a77 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementDirectionalsyncsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/directionalSyncs/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/directionalSyncs/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsEndpoint.py index a6055db21..b3f5e6c73 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementDirectionalsyncsCountEndpoint import \ - ProcurementDirectionalsyncsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementDirectionalsyncsIdEndpoint import ProcurementDirectionalsyncsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementDirectionalsyncsCountEndpoint import ( + ProcurementDirectionalsyncsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementDirectionalsyncsIdEndpoint import ( + ProcurementDirectionalsyncsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DirectionalSync from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DirectionalSync]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DirectionalSync]: """ Performs a GET request against the /procurement/directionalSyncs endpoint. @@ -63,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DirectionalSync]: The parsed response data. """ - return self._parse_many(DirectionalSync, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DirectionalSync, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DirectionalSync: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DirectionalSync: """ Performs a POST request against the /procurement/directionalSyncs endpoint. @@ -75,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: DirectionalSync: The parsed response data. """ - return self._parse_one(DirectionalSync, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + DirectionalSync, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsIdEndpoint.py index ccd186315..ace297d50 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementDirectionalsyncsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DirectionalSync: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DirectionalSync: """ Performs a GET request against the /procurement/directionalSyncs/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DirectionalSync: The parsed response data. """ - return self._parse_one(DirectionalSync, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DirectionalSync, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/directionalSyncs/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DirectionalSync: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DirectionalSync: """ Performs a PUT request against the /procurement/directionalSyncs/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DirectionalSync: The parsed response data. """ - return self._parse_one(DirectionalSync, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + DirectionalSync, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DirectionalSync: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DirectionalSync: """ Performs a PATCH request against the /procurement/directionalSyncs/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: DirectionalSync: The parsed response data. """ - return self._parse_one(DirectionalSync, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + DirectionalSync, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementEndpoint.py index 8b67fe688..2fc6c2a31 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementEndpoint.py @@ -1,29 +1,72 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementAdjustmentsEndpoint import ProcurementAdjustmentsEndpoint -from pyconnectwise.endpoints.manage.ProcurementCatalogEndpoint import ProcurementCatalogEndpoint -from pyconnectwise.endpoints.manage.ProcurementCategoriesEndpoint import ProcurementCategoriesEndpoint -from pyconnectwise.endpoints.manage.ProcurementDirectionalsyncsEndpoint import ProcurementDirectionalsyncsEndpoint -from pyconnectwise.endpoints.manage.ProcurementManufacturersEndpoint import ProcurementManufacturersEndpoint -from pyconnectwise.endpoints.manage.ProcurementOnhandserialnumbersEndpoint import ProcurementOnhandserialnumbersEndpoint -from pyconnectwise.endpoints.manage.ProcurementPricingschedulesEndpoint import ProcurementPricingschedulesEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsEndpoint import ProcurementProductsEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseordersEndpoint import ProcurementPurchaseordersEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesEndpoint import \ - ProcurementPurchaseorderstatusesEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchasingdemandsEndpoint import ProcurementPurchasingdemandsEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmaactionsEndpoint import ProcurementRmaactionsEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmadispositionsEndpoint import ProcurementRmadispositionsEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesEndpoint import ProcurementRmastatusesEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmatagsEndpoint import ProcurementRmatagsEndpoint -from pyconnectwise.endpoints.manage.ProcurementSettingsEndpoint import ProcurementSettingsEndpoint -from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsEndpoint import ProcurementShipmentmethodsEndpoint -from pyconnectwise.endpoints.manage.ProcurementSubcategoriesEndpoint import ProcurementSubcategoriesEndpoint -from pyconnectwise.endpoints.manage.ProcurementTypesEndpoint import ProcurementTypesEndpoint -from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresEndpoint import ProcurementUnitofmeasuresEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousebinsEndpoint import ProcurementWarehousebinsEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousesEndpoint import ProcurementWarehousesEndpoint +from pyconnectwise.endpoints.manage.ProcurementAdjustmentsEndpoint import ( + ProcurementAdjustmentsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCatalogEndpoint import ( + ProcurementCatalogEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementCategoriesEndpoint import ( + ProcurementCategoriesEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementDirectionalsyncsEndpoint import ( + ProcurementDirectionalsyncsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementManufacturersEndpoint import ( + ProcurementManufacturersEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementOnhandserialnumbersEndpoint import ( + ProcurementOnhandserialnumbersEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPricingschedulesEndpoint import ( + ProcurementPricingschedulesEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementProductsEndpoint import ( + ProcurementProductsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseordersEndpoint import ( + ProcurementPurchaseordersEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesEndpoint import ( + ProcurementPurchaseorderstatusesEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchasingdemandsEndpoint import ( + ProcurementPurchasingdemandsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmaactionsEndpoint import ( + ProcurementRmaactionsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmadispositionsEndpoint import ( + ProcurementRmadispositionsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmastatusesEndpoint import ( + ProcurementRmastatusesEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmatagsEndpoint import ( + ProcurementRmatagsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementSettingsEndpoint import ( + ProcurementSettingsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsEndpoint import ( + ProcurementShipmentmethodsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementSubcategoriesEndpoint import ( + ProcurementSubcategoriesEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementTypesEndpoint import ( + ProcurementTypesEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresEndpoint import ( + ProcurementUnitofmeasuresEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementWarehousebinsEndpoint import ( + ProcurementWarehousebinsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementWarehousesEndpoint import ( + ProcurementWarehousesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -32,49 +75,69 @@ class ProcurementEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "procurement", parent_endpoint=parent_endpoint) + self.shipmentmethods = self._register_child_endpoint( + ProcurementShipmentmethodsEndpoint(client, parent_endpoint=self) + ) + self.settings = self._register_child_endpoint( + ProcurementSettingsEndpoint(client, parent_endpoint=self) + ) + self.warehouses = self._register_child_endpoint( + ProcurementWarehousesEndpoint(client, parent_endpoint=self) + ) + self.subcategories = self._register_child_endpoint( + ProcurementSubcategoriesEndpoint(client, parent_endpoint=self) + ) + self.types = self._register_child_endpoint( + ProcurementTypesEndpoint(client, parent_endpoint=self) + ) + self.rma_tags = self._register_child_endpoint( + ProcurementRmatagsEndpoint(client, parent_endpoint=self) + ) + self.catalog = self._register_child_endpoint( + ProcurementCatalogEndpoint(client, parent_endpoint=self) + ) + self.categories = self._register_child_endpoint( + ProcurementCategoriesEndpoint(client, parent_endpoint=self) + ) self.warehouse_bins = self._register_child_endpoint( ProcurementWarehousebinsEndpoint(client, parent_endpoint=self) ) - self.shipmentmethods = self._register_child_endpoint( - ProcurementShipmentmethodsEndpoint(client, parent_endpoint=self) + self.rma_actions = self._register_child_endpoint( + ProcurementRmaactionsEndpoint(client, parent_endpoint=self) ) - self.manufacturers = self._register_child_endpoint( - ProcurementManufacturersEndpoint(client, parent_endpoint=self) + self.purchasing_demands = self._register_child_endpoint( + ProcurementPurchasingdemandsEndpoint(client, parent_endpoint=self) ) - self.onhandserialnumbers = self._register_child_endpoint( - ProcurementOnhandserialnumbersEndpoint(client, parent_endpoint=self) + self.purchaseorders = self._register_child_endpoint( + ProcurementPurchaseordersEndpoint(client, parent_endpoint=self) ) - self.rma_tags = self._register_child_endpoint(ProcurementRmatagsEndpoint(client, parent_endpoint=self)) self.unit_of_measures = self._register_child_endpoint( ProcurementUnitofmeasuresEndpoint(client, parent_endpoint=self) ) self.directional_syncs = self._register_child_endpoint( ProcurementDirectionalsyncsEndpoint(client, parent_endpoint=self) ) - self.catalog = self._register_child_endpoint(ProcurementCatalogEndpoint(client, parent_endpoint=self)) - self.warehouses = self._register_child_endpoint(ProcurementWarehousesEndpoint(client, parent_endpoint=self)) - self.rma_statuses = self._register_child_endpoint(ProcurementRmastatusesEndpoint(client, parent_endpoint=self)) + self.products = self._register_child_endpoint( + ProcurementProductsEndpoint(client, parent_endpoint=self) + ) + self.adjustments = self._register_child_endpoint( + ProcurementAdjustmentsEndpoint(client, parent_endpoint=self) + ) self.purchaseorderstatuses = self._register_child_endpoint( ProcurementPurchaseorderstatusesEndpoint(client, parent_endpoint=self) ) - self.purchasing_demands = self._register_child_endpoint( - ProcurementPurchasingdemandsEndpoint(client, parent_endpoint=self) - ) - self.categories = self._register_child_endpoint(ProcurementCategoriesEndpoint(client, parent_endpoint=self)) self.r_m_a_dispositions = self._register_child_endpoint( ProcurementRmadispositionsEndpoint(client, parent_endpoint=self) ) - self.adjustments = self._register_child_endpoint(ProcurementAdjustmentsEndpoint(client, parent_endpoint=self)) - self.settings = self._register_child_endpoint(ProcurementSettingsEndpoint(client, parent_endpoint=self)) - self.types = self._register_child_endpoint(ProcurementTypesEndpoint(client, parent_endpoint=self)) - self.products = self._register_child_endpoint(ProcurementProductsEndpoint(client, parent_endpoint=self)) - self.rma_actions = self._register_child_endpoint(ProcurementRmaactionsEndpoint(client, parent_endpoint=self)) self.pricingschedules = self._register_child_endpoint( ProcurementPricingschedulesEndpoint(client, parent_endpoint=self) ) - self.purchaseorders = self._register_child_endpoint( - ProcurementPurchaseordersEndpoint(client, parent_endpoint=self) + self.rma_statuses = self._register_child_endpoint( + ProcurementRmastatusesEndpoint(client, parent_endpoint=self) ) - self.subcategories = self._register_child_endpoint( - ProcurementSubcategoriesEndpoint(client, parent_endpoint=self) + self.manufacturers = self._register_child_endpoint( + ProcurementManufacturersEndpoint(client, parent_endpoint=self) + ) + self.onhandserialnumbers = self._register_child_endpoint( + ProcurementOnhandserialnumbersEndpoint(client, parent_endpoint=self) ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersCountEndpoint.py index a5c354873..7e9f446b8 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersCountEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementManufacturersCountInfoEndpoint import \ - ProcurementManufacturersCountInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementManufacturersCountInfoEndpoint import ( + ProcurementManufacturersCountInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Count from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ProcurementManufacturersCountInfoEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/manufacturers/count endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/manufacturers/count endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersCountInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersCountInfoEndpoint.py index 47359dfb3..b3a23ffac 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersCountInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersCountInfoEndpoint.py @@ -10,7 +10,9 @@ class ProcurementManufacturersCountInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/manufacturers/count/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/manufacturers/count/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersEndpoint.py index 3e38f0c78..61ecb476e 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementManufacturersCountEndpoint import ProcurementManufacturersCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementManufacturersIdEndpoint import ProcurementManufacturersIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementManufacturersInfoEndpoint import ProcurementManufacturersInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementManufacturersCountEndpoint import ( + ProcurementManufacturersCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementManufacturersIdEndpoint import ( + ProcurementManufacturersIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementManufacturersInfoEndpoint import ( + ProcurementManufacturersInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Manufacturer from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementManufacturersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "manufacturers", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementManufacturersInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementManufacturersCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementManufacturersCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementManufacturersInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementManufacturersIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Manufacturer]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Manufacturer]: """ Performs a GET request against the /procurement/manufacturers endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Manufacturer]: The parsed response data. """ - return self._parse_many(Manufacturer, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Manufacturer, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Manufacturer: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Manufacturer: """ Performs a POST request against the /procurement/manufacturers endpoint. @@ -74,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Manufacturer: The parsed response data. """ - return self._parse_one(Manufacturer, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Manufacturer, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersIdEndpoint.py index 98d281e2e..ec1aa0002 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementManufacturersIdInfoEndpoint import ProcurementManufacturersIdInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementManufacturersIdInfoEndpoint import ( + ProcurementManufacturersIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Manufacturer from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProcurementManufacturersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementManufacturersIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ProcurementManufacturersIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Manufacturer: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Manufacturer: """ Performs a GET request against the /procurement/manufacturers/{id} endpoint. @@ -46,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: Manufacturer: The parsed response data. """ - return self._parse_one(Manufacturer, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Manufacturer, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/manufacturers/{id} endpoint. @@ -58,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Manufacturer: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Manufacturer: """ Performs a PUT request against the /procurement/manufacturers/{id} endpoint. @@ -70,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: Manufacturer: The parsed response data. """ - return self._parse_one(Manufacturer, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Manufacturer, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Manufacturer: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Manufacturer: """ Performs a PATCH request against the /procurement/manufacturers/{id} endpoint. @@ -82,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Manufacturer: The parsed response data. """ - return self._parse_one(Manufacturer, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Manufacturer, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersIdInfoEndpoint.py index d7b2c3e46..9472ff71f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManufacturerInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManufacturerInfo: """ Performs a GET request against the /procurement/manufacturers/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManufacturerInfo: The parsed response data. """ - return self._parse_one(ManufacturerInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ManufacturerInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersInfoEndpoint.py index ff4c6bfef..27c898ced 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementManufacturersInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementManufacturersInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManufacturerInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManufacturerInfo]: """ Performs a GET request against the /procurement/manufacturers/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ManufacturerInfo]: The parsed response data. """ - return self._parse_many(ManufacturerInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ManufacturerInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersCountEndpoint.py index 2d1df2011..0870800f7 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementOnhandserialnumbersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/onhandserialnumbers/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/onhandserialnumbers/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersEndpoint.py index 6f66868a0..642080cd1 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementOnhandserialnumbersCountEndpoint import \ - ProcurementOnhandserialnumbersCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementOnhandserialnumbersIdEndpoint import \ - ProcurementOnhandserialnumbersIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementOnhandserialnumbersCountEndpoint import ( + ProcurementOnhandserialnumbersCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementOnhandserialnumbersIdEndpoint import ( + ProcurementOnhandserialnumbersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OnHandSerialNumber from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ProcurementOnhandserialnumbersIdEndpoint: Returns: ProcurementOnhandserialnumbersIdEndpoint: The initialized ProcurementOnhandserialnumbersIdEndpoint object. """ - child = ProcurementOnhandserialnumbersIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementOnhandserialnumbersIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OnHandSerialNumber]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OnHandSerialNumber]: """ Performs a GET request against the /procurement/onhandserialnumbers endpoint. @@ -64,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OnHandSerialNumber]: The parsed response data. """ - return self._parse_many(OnHandSerialNumber, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OnHandSerialNumber, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersIdEndpoint.py index 284ce39a6..ff965987b 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementOnhandserialnumbersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OnHandSerialNumber: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OnHandSerialNumber: """ Performs a GET request against the /procurement/onhandserialnumbers/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OnHandSerialNumber: The parsed response data. """ - return self._parse_one(OnHandSerialNumber, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OnHandSerialNumber, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesCountEndpoint.py index 291140bcc..806f66311 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPricingschedulesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/pricingschedules/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/pricingschedules/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesEndpoint.py index ab02db5e0..8759118bc 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPricingschedulesCountEndpoint import \ - ProcurementPricingschedulesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdEndpoint import ProcurementPricingschedulesIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementPricingschedulesCountEndpoint import ( + ProcurementPricingschedulesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdEndpoint import ( + ProcurementPricingschedulesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PricingSchedule from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PricingSchedule]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PricingSchedule]: """ Performs a GET request against the /procurement/pricingschedules endpoint. @@ -63,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PricingSchedule]: The parsed response data. """ - return self._parse_many(PricingSchedule, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PricingSchedule, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingSchedule: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingSchedule: """ Performs a POST request against the /procurement/pricingschedules endpoint. @@ -75,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PricingSchedule: The parsed response data. """ - return self._parse_one(PricingSchedule, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PricingSchedule, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsCountEndpoint.py index fff31afe5..c36c82fa8 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPricingschedulesIdDetailsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/pricingschedules/{id}/details/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/pricingschedules/{id}/details/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsEndpoint.py index 2f6d991a7..7e7336ea3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsCountEndpoint import \ - ProcurementPricingschedulesIdDetailsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsIdEndpoint import \ - ProcurementPricingschedulesIdDetailsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsCountEndpoint import ( + ProcurementPricingschedulesIdDetailsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsIdEndpoint import ( + ProcurementPricingschedulesIdDetailsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PricingDetail from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "details", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ProcurementPricingschedulesIdDetailsCountEndpoint(client, parent_endpoint=self) + ProcurementPricingschedulesIdDetailsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementPricingschedulesIdDetailsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ProcurementPricingschedulesIdDetailsIdEndpoint: Returns: ProcurementPricingschedulesIdDetailsIdEndpoint: The initialized ProcurementPricingschedulesIdDetailsIdEndpoint object. """ - child = ProcurementPricingschedulesIdDetailsIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementPricingschedulesIdDetailsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PricingDetail]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PricingDetail]: """ Performs a GET request against the /procurement/pricingschedules/{id}/details endpoint. @@ -64,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PricingDetail]: The parsed response data. """ - return self._parse_many(PricingDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PricingDetail, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingDetail: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingDetail: """ Performs a POST request against the /procurement/pricingschedules/{id}/details endpoint. @@ -76,4 +88,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PricingDetail: The parsed response data. """ - return self._parse_one(PricingDetail, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PricingDetail, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint.py index 9e5c33f35..fe2a6a9fc 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint(ConnectWiseEndpo def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/pricingschedules/{id}/details/{id}/breaks/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/pricingschedules/{id}/details/{id}/breaks/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksEndpoint.py index 278c57080..e8fe5acc8 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint import \ - ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint import \ - ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint import ( + ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint import ( + ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PricingBreak from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "breaks", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint(client, parent_endpoint=self) + ProcurementPricingschedulesIdDetailsIdBreaksCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint: Returns: ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint: The initialized ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint object. """ - child = ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PricingBreak]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PricingBreak]: """ Performs a GET request against the /procurement/pricingschedules/{id}/details/{id}/breaks endpoint. @@ -64,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PricingBreak]: The parsed response data. """ - return self._parse_many(PricingBreak, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PricingBreak, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingBreak: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingBreak: """ Performs a POST request against the /procurement/pricingschedules/{id}/details/{id}/breaks endpoint. @@ -76,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PricingBreak: The parsed response data. """ - return self._parse_one(PricingBreak, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PricingBreak, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint.py index cbbe118df..18666a0e3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdBreaksIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingBreak: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingBreak: """ Performs a GET request against the /procurement/pricingschedules/{id}/details/{id}/breaks/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PricingBreak: The parsed response data. """ - return self._parse_one(PricingBreak, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PricingBreak, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/pricingschedules/{id}/details/{id}/breaks/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingBreak: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingBreak: """ Performs a PUT request against the /procurement/pricingschedules/{id}/details/{id}/breaks/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PricingBreak: The parsed response data. """ - return self._parse_one(PricingBreak, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PricingBreak, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingBreak: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingBreak: """ Performs a PATCH request against the /procurement/pricingschedules/{id}/details/{id}/breaks/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PricingBreak: The parsed response data. """ - return self._parse_one(PricingBreak, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PricingBreak, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdEndpoint.py index 46edac482..a7f5b1579 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdDetailsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsIdBreaksEndpoint import \ - ProcurementPricingschedulesIdDetailsIdBreaksEndpoint +from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsIdBreaksEndpoint import ( + ProcurementPricingschedulesIdDetailsIdBreaksEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PricingDetail from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.breaks = self._register_child_endpoint( - ProcurementPricingschedulesIdDetailsIdBreaksEndpoint(client, parent_endpoint=self) + ProcurementPricingschedulesIdDetailsIdBreaksEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingDetail: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingDetail: """ Performs a GET request against the /procurement/pricingschedules/{id}/details/{id} endpoint. @@ -49,9 +54,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PricingDetail: The parsed response data. """ - return self._parse_one(PricingDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PricingDetail, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/pricingschedules/{id}/details/{id} endpoint. @@ -61,9 +70,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingDetail: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingDetail: """ Performs a PUT request against the /procurement/pricingschedules/{id}/details/{id} endpoint. @@ -73,9 +87,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PricingDetail: The parsed response data. """ - return self._parse_one(PricingDetail, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PricingDetail, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingDetail: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingDetail: """ Performs a PATCH request against the /procurement/pricingschedules/{id}/details/{id} endpoint. @@ -85,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PricingDetail: The parsed response data. """ - return self._parse_one(PricingDetail, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PricingDetail, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdEndpoint.py index 65f68c3cc..e6282dfea 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPricingschedulesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsEndpoint import \ - ProcurementPricingschedulesIdDetailsEndpoint +from pyconnectwise.endpoints.manage.ProcurementPricingschedulesIdDetailsEndpoint import ( + ProcurementPricingschedulesIdDetailsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PricingSchedule from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingSchedule: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingSchedule: """ Performs a GET request against the /procurement/pricingschedules/{id} endpoint. @@ -49,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PricingSchedule: The parsed response data. """ - return self._parse_one(PricingSchedule, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PricingSchedule, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/pricingschedules/{id} endpoint. @@ -61,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingSchedule: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingSchedule: """ Performs a PUT request against the /procurement/pricingschedules/{id} endpoint. @@ -73,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PricingSchedule: The parsed response data. """ - return self._parse_one(PricingSchedule, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PricingSchedule, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PricingSchedule: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PricingSchedule: """ Performs a PATCH request against the /procurement/pricingschedules/{id} endpoint. @@ -85,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PricingSchedule: The parsed response data. """ - return self._parse_one(PricingSchedule, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PricingSchedule, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsCountEndpoint.py index 01862b4f1..0e8e04fe0 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementProductsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/products/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/products/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsEndpoint.py index 32263339a..fabca52f7 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsCountEndpoint import ProcurementProductsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsIdEndpoint import ProcurementProductsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementProductsCountEndpoint import ( + ProcurementProductsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementProductsIdEndpoint import ( + ProcurementProductsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductItem from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProcurementProductsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "products", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProcurementProductsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementProductsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementProductsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ProcurementProductsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProductItem]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProductItem]: """ Performs a GET request against the /procurement/products endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductItem]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductItem]: """ Performs a GET request against the /procurement/products endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductItem]: The parsed response data. """ - return self._parse_many(ProductItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProductItem, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductItem: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductItem: """ Performs a POST request against the /procurement/products endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProductItem: The parsed response data. """ - return self._parse_one(ProductItem, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProductItem, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsCountEndpoint.py index adc45db75..3845bc5ca 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementProductsIdComponentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/products/{id}/components/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/products/{id}/components/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsEndpoint.py index ecb825722..6093cf2b8 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsIdComponentsCountEndpoint import \ - ProcurementProductsIdComponentsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsIdComponentsIdEndpoint import \ - ProcurementProductsIdComponentsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementProductsIdComponentsCountEndpoint import ( + ProcurementProductsIdComponentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementProductsIdComponentsIdEndpoint import ( + ProcurementProductsIdComponentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductComponent from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ProcurementProductsIdComponentsIdEndpoint: Returns: ProcurementProductsIdComponentsIdEndpoint: The initialized ProcurementProductsIdComponentsIdEndpoint object. """ - child = ProcurementProductsIdComponentsIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementProductsIdComponentsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductComponent]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductComponent]: """ Performs a GET request against the /procurement/products/{id}/components endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductComponent]: The parsed response data. """ - return self._parse_many(ProductComponent, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProductComponent, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductComponent]: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductComponent]: """ Performs a POST request against the /procurement/products/{id}/components endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: list[ProductComponent]: The parsed response data. """ - return self._parse_many(ProductComponent, super()._make_request("POST", data=data, params=params).json()) + return self._parse_many( + ProductComponent, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsIdEndpoint.py index 28f9e6f30..4be07e49e 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdComponentsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductComponent]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductComponent]: """ Performs a GET request against the /procurement/products/{id}/components/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductComponent]: The parsed response data. """ - return self._parse_many(ProductComponent, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProductComponent, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/products/{id}/components/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductComponent]: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductComponent]: """ Performs a PUT request against the /procurement/products/{id}/components/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductComponent]: The parsed response data. """ - return self._parse_many(ProductComponent, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_many( + ProductComponent, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductComponent]: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductComponent]: """ Performs a PATCH request against the /procurement/products/{id}/components/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: list[ProductComponent]: The parsed response data. """ - return self._parse_many(ProductComponent, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_many( + ProductComponent, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdDetachEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdDetachEndpoint.py index 830666389..f6ff90070 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdDetachEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdDetachEndpoint.py @@ -10,7 +10,9 @@ class ProcurementProductsIdDetachEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "detach", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductDetach: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductDetach: """ Performs a POST request against the /procurement/products/{id}/detach endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProductDetach: The parsed response data. """ - return self._parse_one(ProductDetach, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProductDetach, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdEndpoint.py index 8f3164077..865d3c0de 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdEndpoint.py @@ -1,11 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsIdComponentsEndpoint import \ - ProcurementProductsIdComponentsEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsIdDetachEndpoint import ProcurementProductsIdDetachEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsIdPickingshippingdetailsEndpoint import \ - ProcurementProductsIdPickingshippingdetailsEndpoint +from pyconnectwise.endpoints.manage.ProcurementProductsIdComponentsEndpoint import ( + ProcurementProductsIdComponentsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementProductsIdDetachEndpoint import ( + ProcurementProductsIdDetachEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementProductsIdPickingshippingdetailsEndpoint import ( + ProcurementProductsIdPickingshippingdetailsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductItem from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,15 +19,21 @@ class ProcurementProductsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.components = self._register_child_endpoint( - ProcurementProductsIdComponentsEndpoint(client, parent_endpoint=self) + self.detach = self._register_child_endpoint( + ProcurementProductsIdDetachEndpoint(client, parent_endpoint=self) ) self.picking_shipping_details = self._register_child_endpoint( - ProcurementProductsIdPickingshippingdetailsEndpoint(client, parent_endpoint=self) + ProcurementProductsIdPickingshippingdetailsEndpoint( + client, parent_endpoint=self + ) + ) + self.components = self._register_child_endpoint( + ProcurementProductsIdComponentsEndpoint(client, parent_endpoint=self) ) - self.detach = self._register_child_endpoint(ProcurementProductsIdDetachEndpoint(client, parent_endpoint=self)) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProductItem]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProductItem]: """ Performs a GET request against the /procurement/products/{id} endpoint and returns an initialized PaginatedResponse object. @@ -44,7 +54,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductItem: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductItem: """ Performs a GET request against the /procurement/products/{id} endpoint. @@ -54,9 +66,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProductItem: The parsed response data. """ - return self._parse_one(ProductItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProductItem, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/products/{id} endpoint. @@ -66,9 +82,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductItem: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductItem: """ Performs a PUT request against the /procurement/products/{id} endpoint. @@ -78,9 +99,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProductItem: The parsed response data. """ - return self._parse_one(ProductItem, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProductItem, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductItem: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductItem: """ Performs a PATCH request against the /procurement/products/{id} endpoint. @@ -90,4 +115,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProductItem: The parsed response data. """ - return self._parse_one(ProductItem, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProductItem, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsCountEndpoint.py index 79a7d43eb..1a6450f5e 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementProductsIdPickingshippingdetailsCountEndpoint(ConnectWiseEndpoi def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/products/{id}/pickingShippingDetails/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/products/{id}/pickingShippingDetails/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsEndpoint.py index 8a1167491..bcede2b65 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsIdPickingshippingdetailsCountEndpoint import \ - ProcurementProductsIdPickingshippingdetailsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementProductsIdPickingshippingdetailsIdEndpoint import \ - ProcurementProductsIdPickingshippingdetailsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementProductsIdPickingshippingdetailsCountEndpoint import ( + ProcurementProductsIdPickingshippingdetailsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementProductsIdPickingshippingdetailsIdEndpoint import ( + ProcurementProductsIdPickingshippingdetailsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductPickingShippingDetail from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class ProcurementProductsIdPickingshippingdetailsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "pickingShippingDetails", parent_endpoint=parent_endpoint) + super().__init__( + client, "pickingShippingDetails", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - ProcurementProductsIdPickingshippingdetailsCountEndpoint(client, parent_endpoint=self) + ProcurementProductsIdPickingshippingdetailsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementProductsIdPickingshippingdetailsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> ProcurementProductsIdPickingshippingdetailsIdEndpoint: Returns: ProcurementProductsIdPickingshippingdetailsIdEndpoint: The initialized ProcurementProductsIdPickingshippingdetailsIdEndpoint object. """ - child = ProcurementProductsIdPickingshippingdetailsIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementProductsIdPickingshippingdetailsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductPickingShippingDetail]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductPickingShippingDetail]: """ Performs a GET request against the /procurement/products/{id}/pickingShippingDetails endpoint. @@ -65,10 +75,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ProductPickingShippingDetail]: The parsed response data. """ return self._parse_many( - ProductPickingShippingDetail, super()._make_request("GET", data=data, params=params).json() + ProductPickingShippingDetail, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductPickingShippingDetail]: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductPickingShippingDetail]: """ Performs a POST request against the /procurement/products/{id}/pickingShippingDetails endpoint. @@ -79,5 +92,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductPickingShippingDetail]: The parsed response data. """ return self._parse_many( - ProductPickingShippingDetail, super()._make_request("POST", data=data, params=params).json() + ProductPickingShippingDetail, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsIdEndpoint.py index 172329d73..c0d7c235d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementProductsIdPickingShippingDetailsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductPickingShippingDetail]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductPickingShippingDetail]: """ Performs a GET request against the /procurement/products/{id}/pickingShippingDetails/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ProductPickingShippingDetail]: The parsed response data. """ return self._parse_many( - ProductPickingShippingDetail, super()._make_request("GET", data=data, params=params).json() + ProductPickingShippingDetail, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/products/{id}/pickingShippingDetails/{id} endpoint. @@ -57,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductPickingShippingDetail]: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductPickingShippingDetail]: """ Performs a PUT request against the /procurement/products/{id}/pickingShippingDetails/{id} endpoint. @@ -70,10 +80,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ProductPickingShippingDetail]: The parsed response data. """ return self._parse_many( - ProductPickingShippingDetail, super()._make_request("PUT", data=data, params=params).json() + ProductPickingShippingDetail, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductPickingShippingDetail]: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductPickingShippingDetail]: """ Performs a PATCH request against the /procurement/products/{id}/pickingShippingDetails/{id} endpoint. @@ -84,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductPickingShippingDetail]: The parsed response data. """ return self._parse_many( - ProductPickingShippingDetail, super()._make_request("PATCH", data=data, params=params).json() + ProductPickingShippingDetail, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersCountEndpoint.py index 5977dc9e2..cf0fe1e21 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPurchaseordersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/purchaseorders/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/purchaseorders/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersEndpoint.py index 47c8c95b7..3c55a2b52 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseordersCountEndpoint import ProcurementPurchaseordersCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdEndpoint import ProcurementPurchaseordersIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementPurchaseordersCountEndpoint import ( + ProcurementPurchaseordersCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdEndpoint import ( + ProcurementPurchaseordersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PurchaseOrder from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProcurementPurchaseordersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "purchaseorders", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProcurementPurchaseordersCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementPurchaseordersCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementPurchaseordersIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PurchaseOrder]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PurchaseOrder]: """ Performs a GET request against the /procurement/purchaseorders endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PurchaseOrder]: The parsed response data. """ - return self._parse_many(PurchaseOrder, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PurchaseOrder, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrder: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrder: """ Performs a POST request against the /procurement/purchaseorders endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PurchaseOrder: The parsed response data. """ - return self._parse_one(PurchaseOrder, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PurchaseOrder, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdEndpoint.py index e57473cf5..7dc688820 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdLineitemsEndpoint import \ - ProcurementPurchaseordersIdLineitemsEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdRebatchEndpoint import \ - ProcurementPurchaseordersIdRebatchEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdUnbatchEndpoint import \ - ProcurementPurchaseordersIdUnbatchEndpoint +from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdLineitemsEndpoint import ( + ProcurementPurchaseordersIdLineitemsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdRebatchEndpoint import ( + ProcurementPurchaseordersIdRebatchEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdUnbatchEndpoint import ( + ProcurementPurchaseordersIdUnbatchEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PurchaseOrder from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,15 +19,15 @@ class ProcurementPurchaseordersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.rebatch = self._register_child_endpoint( - ProcurementPurchaseordersIdRebatchEndpoint(client, parent_endpoint=self) - ) self.lineitems = self._register_child_endpoint( ProcurementPurchaseordersIdLineitemsEndpoint(client, parent_endpoint=self) ) self.unbatch = self._register_child_endpoint( ProcurementPurchaseordersIdUnbatchEndpoint(client, parent_endpoint=self) ) + self.rebatch = self._register_child_endpoint( + ProcurementPurchaseordersIdRebatchEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -49,7 +52,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrder: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrder: """ Performs a GET request against the /procurement/purchaseorders/{id} endpoint. @@ -59,9 +64,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PurchaseOrder: The parsed response data. """ - return self._parse_one(PurchaseOrder, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PurchaseOrder, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/purchaseorders/{id} endpoint. @@ -71,9 +80,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrder: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrder: """ Performs a PUT request against the /procurement/purchaseorders/{id} endpoint. @@ -83,9 +97,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PurchaseOrder: The parsed response data. """ - return self._parse_one(PurchaseOrder, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PurchaseOrder, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrder: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrder: """ Performs a PATCH request against the /procurement/purchaseorders/{id} endpoint. @@ -95,4 +113,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PurchaseOrder: The parsed response data. """ - return self._parse_one(PurchaseOrder, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PurchaseOrder, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsBulkEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsBulkEndpoint.py index aa42145ae..6c446d8f9 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsBulkEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsBulkEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPurchaseordersIdLineitemsBulkEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "bulk", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BulkResult: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BulkResult: """ Performs a POST request against the /procurement/purchaseorders/{id}/lineitems/bulk endpoint. @@ -20,9 +22,13 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BulkResult: The parsed response data. """ - return self._parse_one(BulkResult, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BulkResult, super()._make_request("POST", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BulkResult: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BulkResult: """ Performs a DELETE request against the /procurement/purchaseorders/{id}/lineitems/bulk endpoint. @@ -32,9 +38,13 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: BulkResult: The parsed response data. """ - return self._parse_one(BulkResult, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + BulkResult, super()._make_request("DELETE", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BulkResult: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BulkResult: """ Performs a PUT request against the /procurement/purchaseorders/{id}/lineitems/bulk endpoint. @@ -44,4 +54,6 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BulkResult: The parsed response data. """ - return self._parse_one(BulkResult, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BulkResult, super()._make_request("PUT", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsCountEndpoint.py index 23b59ab8b..a3e3a2004 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPurchaseordersIdLineitemsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/purchaseorders/{id}/lineitems/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/purchaseorders/{id}/lineitems/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsEndpoint.py index 03fc8ddf4..a9eea87d1 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdLineitemsBulkEndpoint import \ - ProcurementPurchaseordersIdLineitemsBulkEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdLineitemsCountEndpoint import \ - ProcurementPurchaseordersIdLineitemsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdLineitemsIdEndpoint import \ - ProcurementPurchaseordersIdLineitemsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdLineitemsBulkEndpoint import ( + ProcurementPurchaseordersIdLineitemsBulkEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdLineitemsCountEndpoint import ( + ProcurementPurchaseordersIdLineitemsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseordersIdLineitemsIdEndpoint import ( + ProcurementPurchaseordersIdLineitemsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PurchaseOrderLineItem from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,11 +19,15 @@ class ProcurementPurchaseordersIdLineitemsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "lineitems", parent_endpoint=parent_endpoint) - self.bulk = self._register_child_endpoint( - ProcurementPurchaseordersIdLineitemsBulkEndpoint(client, parent_endpoint=self) - ) self.count = self._register_child_endpoint( - ProcurementPurchaseordersIdLineitemsCountEndpoint(client, parent_endpoint=self) + ProcurementPurchaseordersIdLineitemsCountEndpoint( + client, parent_endpoint=self + ) + ) + self.bulk = self._register_child_endpoint( + ProcurementPurchaseordersIdLineitemsBulkEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementPurchaseordersIdLineitemsIdEndpoint: @@ -32,7 +39,9 @@ def id(self, id: int) -> ProcurementPurchaseordersIdLineitemsIdEndpoint: Returns: ProcurementPurchaseordersIdLineitemsIdEndpoint: The initialized ProcurementPurchaseordersIdLineitemsIdEndpoint object. """ - child = ProcurementPurchaseordersIdLineitemsIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementPurchaseordersIdLineitemsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -59,7 +68,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PurchaseOrderLineItem]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PurchaseOrderLineItem]: """ Performs a GET request against the /procurement/purchaseorders/{id}/lineitems endpoint. @@ -69,9 +80,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PurchaseOrderLineItem]: The parsed response data. """ - return self._parse_many(PurchaseOrderLineItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PurchaseOrderLineItem, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderLineItem: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderLineItem: """ Performs a POST request against the /procurement/purchaseorders/{id}/lineitems endpoint. @@ -81,9 +97,14 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PurchaseOrderLineItem: The parsed response data. """ - return self._parse_one(PurchaseOrderLineItem, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PurchaseOrderLineItem, + super()._make_request("POST", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/purchaseorders/{id}/lineitems endpoint. @@ -93,4 +114,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsIdEndpoint.py index c2be65e69..7b05f205b 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdLineitemsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderLineItem: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderLineItem: """ Performs a GET request against the /procurement/purchaseorders/{id}/lineitems/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PurchaseOrderLineItem: The parsed response data. """ - return self._parse_one(PurchaseOrderLineItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PurchaseOrderLineItem, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderLineItem: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderLineItem: """ Performs a PUT request against the /procurement/purchaseorders/{id}/lineitems/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PurchaseOrderLineItem: The parsed response data. """ - return self._parse_one(PurchaseOrderLineItem, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PurchaseOrderLineItem, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderLineItem: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderLineItem: """ Performs a PATCH request against the /procurement/purchaseorders/{id}/lineitems/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PurchaseOrderLineItem: The parsed response data. """ - return self._parse_one(PurchaseOrderLineItem, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PurchaseOrderLineItem, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdRebatchEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdRebatchEndpoint.py index c96f252e1..436bfa1c6 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdRebatchEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdRebatchEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPurchaseordersIdRebatchEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "rebatch", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /procurement/purchaseorders/{id}/rebatch endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdUnbatchEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdUnbatchEndpoint.py index 5abaef05b..2f4182ce5 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdUnbatchEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseordersIdUnbatchEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPurchaseordersIdUnbatchEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "unbatch", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /procurement/purchaseorders/{id}/unbatch endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesCountEndpoint.py index eaaff29ac..bb2fa1ae7 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPurchaseorderstatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/purchaseorderstatuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/purchaseorderstatuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesEndpoint.py index 4dfd10ddf..d61d2fbc1 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesCountEndpoint import \ - ProcurementPurchaseorderstatusesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdEndpoint import \ - ProcurementPurchaseorderstatusesIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesCountEndpoint import ( + ProcurementPurchaseorderstatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdEndpoint import ( + ProcurementPurchaseorderstatusesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PurchaseOrderStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class ProcurementPurchaseorderstatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "purchaseorderstatuses", parent_endpoint=parent_endpoint) + super().__init__( + client, "purchaseorderstatuses", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( ProcurementPurchaseorderstatusesCountEndpoint(client, parent_endpoint=self) @@ -27,7 +31,9 @@ def id(self, id: int) -> ProcurementPurchaseorderstatusesIdEndpoint: Returns: ProcurementPurchaseorderstatusesIdEndpoint: The initialized ProcurementPurchaseorderstatusesIdEndpoint object. """ - child = ProcurementPurchaseorderstatusesIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementPurchaseorderstatusesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PurchaseOrderStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PurchaseOrderStatus]: """ Performs a GET request against the /procurement/purchaseorderstatuses endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PurchaseOrderStatus]: The parsed response data. """ - return self._parse_many(PurchaseOrderStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PurchaseOrderStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatus: """ Performs a POST request against the /procurement/purchaseorderstatuses endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PurchaseOrderStatus: The parsed response data. """ - return self._parse_one(PurchaseOrderStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PurchaseOrderStatus, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint.py index c67dd8c3d..08bf5ab1d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint(ConnectWiseEndpoint): +class ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/emailtemplates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/emailtemplates/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint.py index d1a26289a..28be561e4 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint import \ - ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint import \ - ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint import ( + ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint import ( + ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,7 +16,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "emailtemplates", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint(client, parent_endpoint=self) + ProcurementPurchaseorderstatusesIdEmailtemplatesCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint: @@ -26,6 +30,8 @@ def id(self, id: int) -> ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpo Returns: ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint: The initialized ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint object. """ - child = ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint.py index 009c10e7a..c161078f1 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEmailtemplatesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusEmailTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatusEmailTemplate: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/emailtemplates/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PurchaseOrderStatusEmailTemplate: The parsed response data. """ return self._parse_one( - PurchaseOrderStatusEmailTemplate, super()._make_request("GET", data=data, params=params).json() + PurchaseOrderStatusEmailTemplate, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/purchaseorderstatuses/{id}/emailtemplates/{id} endpoint. @@ -57,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusEmailTemplate: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatusEmailTemplate: """ Performs a PUT request against the /procurement/purchaseorderstatuses/{id}/emailtemplates/{id} endpoint. @@ -70,10 +80,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PurchaseOrderStatusEmailTemplate: The parsed response data. """ return self._parse_one( - PurchaseOrderStatusEmailTemplate, super()._make_request("PUT", data=data, params=params).json() + PurchaseOrderStatusEmailTemplate, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusEmailTemplate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatusEmailTemplate: """ Performs a PATCH request against the /procurement/purchaseorderstatuses/{id}/emailtemplates/{id} endpoint. @@ -84,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusEmailTemplate: The parsed response data. """ return self._parse_one( - PurchaseOrderStatusEmailTemplate, super()._make_request("PATCH", data=data, params=params).json() + PurchaseOrderStatusEmailTemplate, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEndpoint.py index 72c4b39e2..bfeb56b29 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint import \ - ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdNotificationsEndpoint import \ - ProcurementPurchaseorderstatusesIdNotificationsEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdUsagesEndpoint import \ - ProcurementPurchaseorderstatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint import ( + ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdNotificationsEndpoint import ( + ProcurementPurchaseorderstatusesIdNotificationsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdUsagesEndpoint import ( + ProcurementPurchaseorderstatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PurchaseOrderStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,14 +19,20 @@ class ProcurementPurchaseorderstatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.emailtemplates = self._register_child_endpoint( - ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint(client, parent_endpoint=self) - ) self.usages = self._register_child_endpoint( - ProcurementPurchaseorderstatusesIdUsagesEndpoint(client, parent_endpoint=self) + ProcurementPurchaseorderstatusesIdUsagesEndpoint( + client, parent_endpoint=self + ) + ) + self.emailtemplates = self._register_child_endpoint( + ProcurementPurchaseorderstatusesIdEmailtemplatesEndpoint( + client, parent_endpoint=self + ) ) self.notifications = self._register_child_endpoint( - ProcurementPurchaseorderstatusesIdNotificationsEndpoint(client, parent_endpoint=self) + ProcurementPurchaseorderstatusesIdNotificationsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -49,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatus: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id} endpoint. @@ -59,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PurchaseOrderStatus: The parsed response data. """ - return self._parse_one(PurchaseOrderStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PurchaseOrderStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/purchaseorderstatuses/{id} endpoint. @@ -71,9 +87,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatus: """ Performs a PATCH request against the /procurement/purchaseorderstatuses/{id} endpoint. @@ -83,9 +104,14 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PurchaseOrderStatus: The parsed response data. """ - return self._parse_one(PurchaseOrderStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PurchaseOrderStatus, + super()._make_request("PATCH", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatus: """ Performs a PUT request against the /procurement/purchaseorderstatuses/{id} endpoint. @@ -95,4 +121,7 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PurchaseOrderStatus: The parsed response data. """ - return self._parse_one(PurchaseOrderStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PurchaseOrderStatus, + super()._make_request("PUT", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint.py index 3c5b0dc7c..504effd83 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint(ConnectWiseEn def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/notifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/notifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsEndpoint.py index ad757c4cf..8d10d21d5 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint import \ - ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint import \ - ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint import ( + ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint import ( + ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PurchaseOrderStatusNotification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "notifications", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint(client, parent_endpoint=self) + ProcurementPurchaseorderstatusesIdNotificationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ProcurementPurchaseorderstatusesIdNotificationsIdEndpoi Returns: ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint: The initialized ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint object. """ - child = ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,10 +73,13 @@ def get( list[PurchaseOrderStatusNotification]: The parsed response data. """ return self._parse_many( - PurchaseOrderStatusNotification, super()._make_request("GET", data=data, params=params).json() + PurchaseOrderStatusNotification, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusNotification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatusNotification: """ Performs a POST request against the /procurement/purchaseorderstatuses/{id}/notifications endpoint. @@ -81,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusNotification: The parsed response data. """ return self._parse_one( - PurchaseOrderStatusNotification, super()._make_request("POST", data=data, params=params).json() + PurchaseOrderStatusNotification, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint.py index 3cf8f357f..986af10a3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdNotificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusNotification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatusNotification: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/notifications/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PurchaseOrderStatusNotification: The parsed response data. """ return self._parse_one( - PurchaseOrderStatusNotification, super()._make_request("GET", data=data, params=params).json() + PurchaseOrderStatusNotification, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/purchaseorderstatuses/{id}/notifications/{id} endpoint. @@ -57,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusNotification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatusNotification: """ Performs a PUT request against the /procurement/purchaseorderstatuses/{id}/notifications/{id} endpoint. @@ -70,10 +80,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P PurchaseOrderStatusNotification: The parsed response data. """ return self._parse_one( - PurchaseOrderStatusNotification, super()._make_request("PUT", data=data, params=params).json() + PurchaseOrderStatusNotification, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusNotification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchaseOrderStatusNotification: """ Performs a PATCH request against the /procurement/purchaseorderstatuses/{id}/notifications/{id} endpoint. @@ -84,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchaseOrderStatusNotification: The parsed response data. """ return self._parse_one( - PurchaseOrderStatusNotification, super()._make_request("PATCH", data=data, params=params).json() + PurchaseOrderStatusNotification, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdUsagesEndpoint.py index cf637adc3..d8775f924 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdUsagesListEndpoint import \ - ProcurementPurchaseorderstatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ProcurementPurchaseorderstatusesIdUsagesListEndpoint import ( + ProcurementPurchaseorderstatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +14,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) self.list = self._register_child_endpoint( - ProcurementPurchaseorderstatusesIdUsagesListEndpoint(client, parent_endpoint=self) + ProcurementPurchaseorderstatusesIdUsagesListEndpoint( + client, parent_endpoint=self + ) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +42,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/usages endpoint. @@ -47,4 +54,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdUsagesListEndpoint.py index 134c6fc86..b9822364d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchaseorderstatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPurchaseorderstatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/purchaseorderstatuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementPurchasingDemandsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementPurchasingDemandsEndpoint.py index 567d7e05e..31f76c748 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementPurchasingDemandsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementPurchasingDemandsEndpoint.py @@ -10,7 +10,9 @@ class ProcurementPurchasingdemandsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "purchasingDemands", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PurchasingDemand: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PurchasingDemand: """ Performs a POST request against the /procurement/purchasingDemands endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PurchasingDemand: The parsed response data. """ - return self._parse_one(PurchasingDemand, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PurchasingDemand, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsCountEndpoint.py index bf53536d3..9351f4712 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmadispositionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/RMADispositions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/RMADispositions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsEndpoint.py index b0c0a5b26..4e0422d0c 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsEndpoint.py @@ -1,10 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmadispositionsCountEndpoint import \ - ProcurementRmadispositionsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmadispositionsIdEndpoint import ProcurementRmadispositionsIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmadispositionsInfoEndpoint import ProcurementRmadispositionsInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmadispositionsCountEndpoint import ( + ProcurementRmadispositionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmadispositionsIdEndpoint import ( + ProcurementRmadispositionsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmadispositionsInfoEndpoint import ( + ProcurementRmadispositionsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaDisposition from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,10 +19,12 @@ class ProcurementRmadispositionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "RMADispositions", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementRmadispositionsInfoEndpoint(client, parent_endpoint=self)) self.count = self._register_child_endpoint( ProcurementRmadispositionsCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ProcurementRmadispositionsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementRmadispositionsIdEndpoint: """ @@ -55,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RmaDisposition]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RmaDisposition]: """ Performs a GET request against the /procurement/RMADispositions endpoint. @@ -65,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RmaDisposition]: The parsed response data. """ - return self._parse_many(RmaDisposition, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RmaDisposition, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaDisposition: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaDisposition: """ Performs a POST request against the /procurement/RMADispositions endpoint. @@ -77,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaDisposition: The parsed response data. """ - return self._parse_one(RmaDisposition, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + RmaDisposition, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsIdEndpoint.py index a2067c168..413578a45 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmadispositionsIdInfoEndpoint import \ - ProcurementRmadispositionsIdInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmadispositionsIdInfoEndpoint import ( + ProcurementRmadispositionsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaDisposition from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaDisposition: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaDisposition: """ Performs a GET request against the /procurement/RMADispositions/{id} endpoint. @@ -49,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaDisposition: The parsed response data. """ - return self._parse_one(RmaDisposition, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaDisposition, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/RMADispositions/{id} endpoint. @@ -61,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaDisposition: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaDisposition: """ Performs a PUT request against the /procurement/RMADispositions/{id} endpoint. @@ -73,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaDisposition: The parsed response data. """ - return self._parse_one(RmaDisposition, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + RmaDisposition, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaDisposition: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaDisposition: """ Performs a PATCH request against the /procurement/RMADispositions/{id} endpoint. @@ -85,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaDisposition: The parsed response data. """ - return self._parse_one(RmaDisposition, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + RmaDisposition, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsIdInfoEndpoint.py index 811075e8c..5c71fdda3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaDispositionInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaDispositionInfo: """ Performs a GET request against the /procurement/RMADispositions/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaDispositionInfo: The parsed response data. """ - return self._parse_one(RmaDispositionInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaDispositionInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsInfoCountEndpoint.py index a53f9c5cd..6c2f03bf3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmadispositionsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/RMADispositions/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/RMADispositions/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsInfoEndpoint.py index 2c36ab836..b852ca31f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRMADispositionsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmadispositionsInfoCountEndpoint import \ - ProcurementRmadispositionsInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmadispositionsInfoCountEndpoint import ( + ProcurementRmadispositionsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaDispositionInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RmaDispositionInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RmaDispositionInfo]: """ Performs a GET request against the /procurement/RMADispositions/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RmaDispositionInfo]: The parsed response data. """ - return self._parse_many(RmaDispositionInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RmaDispositionInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsCountEndpoint.py index 67b9a74b0..5c5d20f41 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmaactionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/rmaActions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/rmaActions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsEndpoint.py index 99bdbdc4b..5bea731d3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmaactionsCountEndpoint import ProcurementRmaactionsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmaactionsIdEndpoint import ProcurementRmaactionsIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmaactionsInfoEndpoint import ProcurementRmaactionsInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmaactionsCountEndpoint import ( + ProcurementRmaactionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmaactionsIdEndpoint import ( + ProcurementRmaactionsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmaactionsInfoEndpoint import ( + ProcurementRmaactionsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaAction from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementRmaactionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "rmaActions", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementRmaactionsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementRmaactionsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementRmaactionsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementRmaactionsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementRmaactionsIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ProcurementRmaactionsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[RmaAction]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[RmaAction]: """ Performs a GET request against the /procurement/rmaActions endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RmaAction]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RmaAction]: """ Performs a GET request against the /procurement/rmaActions endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RmaAction]: The parsed response data. """ - return self._parse_many(RmaAction, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RmaAction, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaAction: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaAction: """ Performs a POST request against the /procurement/rmaActions endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaAction: The parsed response data. """ - return self._parse_one(RmaAction, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + RmaAction, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsIdEndpoint.py index ee71cb5f2..0cd6f795f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmaactionsIdInfoEndpoint import ProcurementRmaactionsIdInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmaactionsIdInfoEndpoint import ( + ProcurementRmaactionsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaAction from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ProcurementRmaactionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementRmaactionsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ProcurementRmaactionsIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[RmaAction]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[RmaAction]: """ Performs a GET request against the /procurement/rmaActions/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaAction: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaAction: """ Performs a GET request against the /procurement/rmaActions/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaAction: The parsed response data. """ - return self._parse_one(RmaAction, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaAction, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/rmaActions/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaAction: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaAction: """ Performs a PUT request against the /procurement/rmaActions/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaAction: The parsed response data. """ - return self._parse_one(RmaAction, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + RmaAction, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaAction: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaAction: """ Performs a PATCH request against the /procurement/rmaActions/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaAction: The parsed response data. """ - return self._parse_one(RmaAction, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + RmaAction, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsIdInfoEndpoint.py index dd6fb7482..a658b2ae8 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaActionInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaActionInfo: """ Performs a GET request against the /procurement/rmaActions/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaActionInfo: The parsed response data. """ - return self._parse_one(RmaActionInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaActionInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsInfoCountEndpoint.py index e75961a2b..c2d1fc692 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmaactionsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/rmaActions/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/rmaActions/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsInfoEndpoint.py index a14850f8e..e6f642a7f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaActionsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmaactionsInfoCountEndpoint import ProcurementRmaactionsInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmaactionsInfoCountEndpoint import ( + ProcurementRmaactionsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaActionInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProcurementRmaactionsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProcurementRmaactionsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementRmaactionsInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RmaActionInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RmaActionInfo]: """ Performs a GET request against the /procurement/rmaActions/info endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RmaActionInfo]: The parsed response data. """ - return self._parse_many(RmaActionInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RmaActionInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesCountEndpoint.py index c878afb32..1564b1d7c 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmastatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/rmaStatuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/rmaStatuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesEndpoint.py index ff2411d98..5e854401e 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesCountEndpoint import ProcurementRmastatusesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdEndpoint import ProcurementRmastatusesIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesInfoEndpoint import ProcurementRmastatusesInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmastatusesCountEndpoint import ( + ProcurementRmastatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdEndpoint import ( + ProcurementRmastatusesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmastatusesInfoEndpoint import ( + ProcurementRmastatusesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementRmastatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "rmaStatuses", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementRmastatusesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementRmastatusesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementRmastatusesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementRmastatusesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementRmastatusesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ProcurementRmastatusesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[RmaStatus]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[RmaStatus]: """ Performs a GET request against the /procurement/rmaStatuses endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RmaStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RmaStatus]: """ Performs a GET request against the /procurement/rmaStatuses endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RmaStatus]: The parsed response data. """ - return self._parse_many(RmaStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RmaStatus, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatus: """ Performs a POST request against the /procurement/rmaStatuses endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaStatus: The parsed response data. """ - return self._parse_one(RmaStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + RmaStatus, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEmailtemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEmailtemplatesCountEndpoint.py index 4b66b2f29..bb9f9c5e5 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEmailtemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEmailtemplatesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmastatusesIdEmailtemplatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/rmaStatuses/{id}/emailtemplates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/rmaStatuses/{id}/emailtemplates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEmailtemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEmailtemplatesIdEndpoint.py index 33194ec38..6922e09de 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEmailtemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEmailtemplatesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatusEmailTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatusEmailTemplate: """ Performs a GET request against the /procurement/rmaStatuses/{id}/emailtemplates/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaStatusEmailTemplate: The parsed response data. """ - return self._parse_one(RmaStatusEmailTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaStatusEmailTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/rmaStatuses/{id}/emailtemplates/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatusEmailTemplate: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatusEmailTemplate: """ Performs a PUT request against the /procurement/rmaStatuses/{id}/emailtemplates/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaStatusEmailTemplate: The parsed response data. """ - return self._parse_one(RmaStatusEmailTemplate, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + RmaStatusEmailTemplate, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatusEmailTemplate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatusEmailTemplate: """ Performs a PATCH request against the /procurement/rmaStatuses/{id}/emailtemplates/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaStatusEmailTemplate: The parsed response data. """ - return self._parse_one(RmaStatusEmailTemplate, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + RmaStatusEmailTemplate, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEndpoint.py index 538ef8979..818a9751d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdEndpoint.py @@ -1,12 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdEmailtemplatesEndpoint import \ - ProcurementRmastatusesIdEmailtemplatesEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdInfoEndpoint import ProcurementRmastatusesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdNotificationsEndpoint import \ - ProcurementRmastatusesIdNotificationsEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdUsagesEndpoint import ProcurementRmastatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdEmailtemplatesEndpoint import ( + ProcurementRmastatusesIdEmailtemplatesEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdInfoEndpoint import ( + ProcurementRmastatusesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdNotificationsEndpoint import ( + ProcurementRmastatusesIdNotificationsEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdUsagesEndpoint import ( + ProcurementRmastatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,21 +22,25 @@ class ProcurementRmastatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementRmastatusesIdInfoEndpoint(client, parent_endpoint=self)) - self.emailtemplates = self._register_child_endpoint( + self.info = self._register_child_endpoint( + ProcurementRmastatusesIdInfoEndpoint(client, parent_endpoint=self) + ) + self.notifications = self._register_child_endpoint( + ProcurementRmastatusesIdNotificationsEndpoint(client, parent_endpoint=self) + ) + self.email_templates = self._register_child_endpoint( ProcurementRmastatusesIdEmailtemplatesEndpoint(client, parent_endpoint=self) ) self.usages = self._register_child_endpoint( ProcurementRmastatusesIdUsagesEndpoint(client, parent_endpoint=self) ) - self.email_templates = self._register_child_endpoint( + self.emailtemplates = self._register_child_endpoint( ProcurementRmastatusesIdEmailtemplatesEndpoint(client, parent_endpoint=self) ) - self.notifications = self._register_child_endpoint( - ProcurementRmastatusesIdNotificationsEndpoint(client, parent_endpoint=self) - ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[RmaStatus]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[RmaStatus]: """ Performs a GET request against the /procurement/rmaStatuses/{id} endpoint and returns an initialized PaginatedResponse object. @@ -51,7 +61,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatus: """ Performs a GET request against the /procurement/rmaStatuses/{id} endpoint. @@ -61,9 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaStatus: The parsed response data. """ - return self._parse_one(RmaStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaStatus, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/rmaStatuses/{id} endpoint. @@ -73,9 +89,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatus: """ Performs a PUT request against the /procurement/rmaStatuses/{id} endpoint. @@ -85,9 +106,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaStatus: The parsed response data. """ - return self._parse_one(RmaStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + RmaStatus, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatus: """ Performs a PATCH request against the /procurement/rmaStatuses/{id} endpoint. @@ -97,4 +122,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaStatus: The parsed response data. """ - return self._parse_one(RmaStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + RmaStatus, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdInfoEndpoint.py index d86ff49be..014612c30 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatusInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatusInfo: """ Performs a GET request against the /procurement/rmaStatuses/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaStatusInfo: The parsed response data. """ - return self._parse_one(RmaStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaStatusInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsCountEndpoint.py index d5986add4..70a6bac11 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmastatusesIdNotificationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/rmaStatuses/{id}/notifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/rmaStatuses/{id}/notifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsEndpoint.py index bba1778f5..74891f87b 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdNotificationsCountEndpoint import \ - ProcurementRmastatusesIdNotificationsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdNotificationsIdEndpoint import \ - ProcurementRmastatusesIdNotificationsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdNotificationsCountEndpoint import ( + ProcurementRmastatusesIdNotificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdNotificationsIdEndpoint import ( + ProcurementRmastatusesIdNotificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaStatusNotification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "notifications", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ProcurementRmastatusesIdNotificationsCountEndpoint(client, parent_endpoint=self) + ProcurementRmastatusesIdNotificationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementRmastatusesIdNotificationsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ProcurementRmastatusesIdNotificationsIdEndpoint: Returns: ProcurementRmastatusesIdNotificationsIdEndpoint: The initialized ProcurementRmastatusesIdNotificationsIdEndpoint object. """ - child = ProcurementRmastatusesIdNotificationsIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementRmastatusesIdNotificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RmaStatusNotification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RmaStatusNotification]: """ Performs a GET request against the /procurement/rmaStatuses/{id}/notifications endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RmaStatusNotification]: The parsed response data. """ - return self._parse_many(RmaStatusNotification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RmaStatusNotification, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatusNotification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatusNotification: """ Performs a POST request against the /procurement/rmaStatuses/{id}/notifications endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaStatusNotification: The parsed response data. """ - return self._parse_one(RmaStatusNotification, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + RmaStatusNotification, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsIdEndpoint.py index ebc84001f..9972647b6 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdNotificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatusNotification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatusNotification: """ Performs a GET request against the /procurement/rmaStatuses/{id}/notifications/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaStatusNotification: The parsed response data. """ - return self._parse_one(RmaStatusNotification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaStatusNotification, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/rmaStatuses/{id}/notifications/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatusNotification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatusNotification: """ Performs a PUT request against the /procurement/rmaStatuses/{id}/notifications/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaStatusNotification: The parsed response data. """ - return self._parse_one(RmaStatusNotification, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + RmaStatusNotification, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaStatusNotification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaStatusNotification: """ Performs a PATCH request against the /procurement/rmaStatuses/{id}/notifications/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaStatusNotification: The parsed response data. """ - return self._parse_one(RmaStatusNotification, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + RmaStatusNotification, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdUsagesEndpoint.py index a13df350f..aa6a6575d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdUsagesListEndpoint import \ - ProcurementRmastatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmastatusesIdUsagesListEndpoint import ( + ProcurementRmastatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ProcurementRmastatusesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/rmaStatuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/rmaStatuses/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdUsagesListEndpoint.py index 33cc8fdc6..43edcaa42 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmastatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/rmaStatuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/rmaStatuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesInfoCountEndpoint.py index 5b5027ba2..fefeaa573 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmastatusesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/rmaStatuses/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/rmaStatuses/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesInfoEndpoint.py index 2f8a263b1..43322888d 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaStatusesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmastatusesInfoCountEndpoint import \ - ProcurementRmastatusesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmastatusesInfoCountEndpoint import ( + ProcurementRmastatusesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaStatusInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RmaStatusInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RmaStatusInfo]: """ Performs a GET request against the /procurement/rmaStatuses/info endpoint. @@ -49,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RmaStatusInfo]: The parsed response data. """ - return self._parse_many(RmaStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RmaStatusInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsCountEndpoint.py index 9a50f25d4..b3636f324 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmatagsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/rmaTags/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/rmaTags/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsDefaultEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsDefaultEndpoint.py index fff281788..40e924d63 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsDefaultEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsDefaultEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmatagsDefaultEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "default", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[RmaTag]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[RmaTag]: """ Performs a GET request against the /procurement/rmaTags/default endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaTag: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaTag: """ Performs a GET request against the /procurement/rmaTags/default endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaTag: The parsed response data. """ - return self._parse_one(RmaTag, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaTag, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsEndpoint.py index 823ddc6e1..3f055cd0c 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmatagsCountEndpoint import ProcurementRmatagsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmatagsDefaultEndpoint import ProcurementRmatagsDefaultEndpoint -from pyconnectwise.endpoints.manage.ProcurementRmatagsIdEndpoint import ProcurementRmatagsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementRmatagsCountEndpoint import ( + ProcurementRmatagsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmatagsDefaultEndpoint import ( + ProcurementRmatagsDefaultEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementRmatagsIdEndpoint import ( + ProcurementRmatagsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import RmaTag from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementRmatagsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "rmaTags", parent_endpoint=parent_endpoint) - self.default = self._register_child_endpoint(ProcurementRmatagsDefaultEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementRmatagsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementRmatagsCountEndpoint(client, parent_endpoint=self) + ) + self.default = self._register_child_endpoint( + ProcurementRmatagsDefaultEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementRmatagsIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ProcurementRmatagsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[RmaTag]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[RmaTag]: """ Performs a GET request against the /procurement/rmaTags endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[RmaTag]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[RmaTag]: """ Performs a GET request against the /procurement/rmaTags endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[RmaTag]: The parsed response data. """ - return self._parse_many(RmaTag, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + RmaTag, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaTag: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaTag: """ Performs a POST request against the /procurement/rmaTags endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaTag: The parsed response data. """ - return self._parse_one(RmaTag, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + RmaTag, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsIdEndpoint.py index ea18e2d30..987d18e00 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementRmaTagsIdEndpoint.py @@ -10,7 +10,9 @@ class ProcurementRmatagsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[RmaTag]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[RmaTag]: """ Performs a GET request against the /procurement/rmaTags/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaTag: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaTag: """ Performs a GET request against the /procurement/rmaTags/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaTag: The parsed response data. """ - return self._parse_one(RmaTag, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + RmaTag, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/rmaTags/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaTag: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaTag: """ Performs a PUT request against the /procurement/rmaTags/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: RmaTag: The parsed response data. """ - return self._parse_one(RmaTag, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + RmaTag, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> RmaTag: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> RmaTag: """ Performs a PATCH request against the /procurement/rmaTags/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: RmaTag: The parsed response data. """ - return self._parse_one(RmaTag, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + RmaTag, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSettingsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSettingsCountEndpoint.py index fbd1c7769..77d333e6f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSettingsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSettingsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementSettingsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/settings/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/settings/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSettingsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSettingsEndpoint.py index 816f91617..b9d5c4a63 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSettingsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementSettingsCountEndpoint import ProcurementSettingsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementSettingsIdEndpoint import ProcurementSettingsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementSettingsCountEndpoint import ( + ProcurementSettingsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementSettingsIdEndpoint import ( + ProcurementSettingsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProcurementSetting from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProcurementSettingsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "settings", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProcurementSettingsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementSettingsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementSettingsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProcurementSetting]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProcurementSetting]: """ Performs a GET request against the /procurement/settings endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProcurementSetting]: The parsed response data. """ - return self._parse_many(ProcurementSetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProcurementSetting, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSettingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSettingsIdEndpoint.py index 7cb5f05bd..fc2635028 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSettingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSettingsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProcurementSetting: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProcurementSetting: """ Performs a GET request against the /procurement/settings/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProcurementSetting: The parsed response data. """ - return self._parse_one(ProcurementSetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProcurementSetting, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProcurementSetting: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProcurementSetting: """ Performs a PUT request against the /procurement/settings/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProcurementSetting: The parsed response data. """ - return self._parse_one(ProcurementSetting, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProcurementSetting, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProcurementSetting: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProcurementSetting: """ Performs a PATCH request against the /procurement/settings/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProcurementSetting: The parsed response data. """ - return self._parse_one(ProcurementSetting, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProcurementSetting, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsCountEndpoint.py index 3d1ec7f74..42aa90903 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementShipmentmethodsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/shipmentmethods/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/shipmentmethods/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsEndpoint.py index 4394f03d6..4c9a6b6c5 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsEndpoint.py @@ -1,10 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsCountEndpoint import \ - ProcurementShipmentmethodsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsIdEndpoint import ProcurementShipmentmethodsIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsInfoEndpoint import ProcurementShipmentmethodsInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsCountEndpoint import ( + ProcurementShipmentmethodsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsIdEndpoint import ( + ProcurementShipmentmethodsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsInfoEndpoint import ( + ProcurementShipmentmethodsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ShipmentMethod from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,10 +19,12 @@ class ProcurementShipmentmethodsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "shipmentmethods", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementShipmentmethodsInfoEndpoint(client, parent_endpoint=self)) self.count = self._register_child_endpoint( ProcurementShipmentmethodsCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ProcurementShipmentmethodsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementShipmentmethodsIdEndpoint: """ @@ -55,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ShipmentMethod]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ShipmentMethod]: """ Performs a GET request against the /procurement/shipmentmethods endpoint. @@ -65,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ShipmentMethod]: The parsed response data. """ - return self._parse_many(ShipmentMethod, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ShipmentMethod, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ShipmentMethod: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ShipmentMethod: """ Performs a POST request against the /procurement/shipmentmethods endpoint. @@ -77,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ShipmentMethod: The parsed response data. """ - return self._parse_one(ShipmentMethod, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ShipmentMethod, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdEndpoint.py index 53e33cd80..fbe0994ca 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsIdInfoEndpoint import \ - ProcurementShipmentmethodsIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsIdUsagesEndpoint import \ - ProcurementShipmentmethodsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsIdInfoEndpoint import ( + ProcurementShipmentmethodsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsIdUsagesEndpoint import ( + ProcurementShipmentmethodsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ShipmentMethod from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,12 +16,12 @@ class ProcurementShipmentmethodsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - ProcurementShipmentmethodsIdInfoEndpoint(client, parent_endpoint=self) - ) self.usages = self._register_child_endpoint( ProcurementShipmentmethodsIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ProcurementShipmentmethodsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -44,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ShipmentMethod: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ShipmentMethod: """ Performs a GET request against the /procurement/shipmentmethods/{id} endpoint. @@ -54,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ShipmentMethod: The parsed response data. """ - return self._parse_one(ShipmentMethod, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ShipmentMethod, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/shipmentmethods/{id} endpoint. @@ -66,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ShipmentMethod: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ShipmentMethod: """ Performs a PUT request against the /procurement/shipmentmethods/{id} endpoint. @@ -78,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ShipmentMethod: The parsed response data. """ - return self._parse_one(ShipmentMethod, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ShipmentMethod, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ShipmentMethod: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ShipmentMethod: """ Performs a PATCH request against the /procurement/shipmentmethods/{id} endpoint. @@ -90,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ShipmentMethod: The parsed response data. """ - return self._parse_one(ShipmentMethod, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ShipmentMethod, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdInfoEndpoint.py index e8cd40a71..34f0f10f3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ShipmentMethodInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ShipmentMethodInfo: """ Performs a GET request against the /procurement/shipmentmethods/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ShipmentMethodInfo: The parsed response data. """ - return self._parse_one(ShipmentMethodInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ShipmentMethodInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdUsagesEndpoint.py index b7fecbc48..60af0cb39 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsIdUsagesListEndpoint import \ - ProcurementShipmentmethodsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsIdUsagesListEndpoint import ( + ProcurementShipmentmethodsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ProcurementShipmentmethodsIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/shipmentmethods/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/shipmentmethods/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdUsagesListEndpoint.py index 284bfb6ca..247131d12 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ProcurementShipmentmethodsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/shipmentmethods/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/shipmentmethods/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsInfoCountEndpoint.py index 582b5508f..6e4ba6c42 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementShipmentmethodsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/shipmentmethods/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/shipmentmethods/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsInfoEndpoint.py index 7522958a5..0080c7e40 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementShipmentmethodsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsInfoCountEndpoint import \ - ProcurementShipmentmethodsInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementShipmentmethodsInfoCountEndpoint import ( + ProcurementShipmentmethodsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ShipmentMethodInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ShipmentMethodInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ShipmentMethodInfo]: """ Performs a GET request against the /procurement/shipmentmethods/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ShipmentMethodInfo]: The parsed response data. """ - return self._parse_many(ShipmentMethodInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ShipmentMethodInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesCountEndpoint.py index 69ca831f9..1915069ab 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementSubcategoriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/subcategories/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/subcategories/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesEndpoint.py index 6247f85fd..53a7814b1 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementSubcategoriesCountEndpoint import ProcurementSubcategoriesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementSubcategoriesIdEndpoint import ProcurementSubcategoriesIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementSubcategoriesInfoEndpoint import ProcurementSubcategoriesInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementSubcategoriesCountEndpoint import ( + ProcurementSubcategoriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementSubcategoriesIdEndpoint import ( + ProcurementSubcategoriesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementSubcategoriesInfoEndpoint import ( + ProcurementSubcategoriesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,8 +18,12 @@ class ProcurementSubcategoriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "subcategories", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementSubcategoriesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementSubcategoriesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementSubcategoriesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementSubcategoriesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementSubcategoriesIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdEndpoint.py index fbca80e9d..ed5a660fb 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementSubcategoriesIdInfoEndpoint import ProcurementSubcategoriesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProcurementSubcategoriesIdUsagesEndpoint import \ - ProcurementSubcategoriesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ProcurementSubcategoriesIdInfoEndpoint import ( + ProcurementSubcategoriesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementSubcategoriesIdUsagesEndpoint import ( + ProcurementSubcategoriesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SubCategory from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,12 +16,16 @@ class ProcurementSubcategoriesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementSubcategoriesIdInfoEndpoint(client, parent_endpoint=self)) self.usages = self._register_child_endpoint( ProcurementSubcategoriesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ProcurementSubcategoriesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SubCategory]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SubCategory]: """ Performs a GET request against the /procurement/subcategories/{id} endpoint and returns an initialized PaginatedResponse object. @@ -39,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SubCategory: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SubCategory: """ Performs a GET request against the /procurement/subcategories/{id} endpoint. @@ -49,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SubCategory: The parsed response data. """ - return self._parse_one(SubCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SubCategory, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/subcategories/{id} endpoint. @@ -61,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SubCategory: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SubCategory: """ Performs a PUT request against the /procurement/subcategories/{id} endpoint. @@ -73,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SubCategory: The parsed response data. """ - return self._parse_one(SubCategory, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SubCategory, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SubCategory: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SubCategory: """ Performs a PATCH request against the /procurement/subcategories/{id} endpoint. @@ -85,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SubCategory: The parsed response data. """ - return self._parse_one(SubCategory, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SubCategory, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdInfoEndpoint.py index 24806bed4..fdfcf4e27 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SubCategoryInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SubCategoryInfo: """ Performs a GET request against the /procurement/subcategories/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SubCategoryInfo: The parsed response data. """ - return self._parse_one(SubCategoryInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SubCategoryInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdUsagesEndpoint.py index 218edd398..6dc5f5c43 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementSubcategoriesIdUsagesListEndpoint import \ - ProcurementSubcategoriesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ProcurementSubcategoriesIdUsagesListEndpoint import ( + ProcurementSubcategoriesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ProcurementSubcategoriesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/subcategories/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/subcategories/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdUsagesListEndpoint.py index f22bbc38c..b6f5e4e81 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ProcurementSubcategoriesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/subcategories/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/subcategories/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesInfoCountEndpoint.py index d96058d02..df0486844 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementSubcategoriesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/subcategories/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/subcategories/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesInfoEndpoint.py index 5dd3938ea..090c7e6ff 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementSubcategoriesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementSubcategoriesInfoCountEndpoint import \ - ProcurementSubcategoriesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementSubcategoriesInfoCountEndpoint import ( + ProcurementSubcategoriesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/ProcurementTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementTypesCountEndpoint.py index 37b524cb5..72cb1e07e 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementTypesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementTypesEndpoint.py index 450a7ee08..079bfcefa 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementTypesCountEndpoint import ProcurementTypesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementTypesIdEndpoint import ProcurementTypesIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementTypesInfoEndpoint import ProcurementTypesInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementTypesCountEndpoint import ( + ProcurementTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementTypesIdEndpoint import ( + ProcurementTypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementTypesInfoEndpoint import ( + ProcurementTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementTypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementTypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementTypesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ProcurementTypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProductType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProductType]: """ Performs a GET request against the /procurement/types endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductType]: """ Performs a GET request against the /procurement/types endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductType]: The parsed response data. """ - return self._parse_many(ProductType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProductType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductType: """ Performs a POST request against the /procurement/types endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProductType: The parsed response data. """ - return self._parse_one(ProductType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProductType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementTypesIdEndpoint.py index 8f950b11a..bab20884e 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementTypesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementTypesIdInfoEndpoint import ProcurementTypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProcurementTypesIdUsagesEndpoint import ProcurementTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ProcurementTypesIdInfoEndpoint import ( + ProcurementTypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementTypesIdUsagesEndpoint import ( + ProcurementTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class ProcurementTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementTypesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ProcurementTypesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ProcurementTypesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementTypesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProductType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProductType]: """ Performs a GET request against the /procurement/types/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductType: """ Performs a GET request against the /procurement/types/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProductType: The parsed response data. """ - return self._parse_one(ProductType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProductType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/types/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductType: """ Performs a PUT request against the /procurement/types/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProductType: The parsed response data. """ - return self._parse_one(ProductType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProductType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductType: """ Performs a PATCH request against the /procurement/types/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProductType: The parsed response data. """ - return self._parse_one(ProductType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProductType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementTypesIdInfoEndpoint.py index 8d7563c1d..6ba728541 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProductTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProductTypeInfo: """ Performs a GET request against the /procurement/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProductTypeInfo: The parsed response data. """ - return self._parse_one(ProductTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProductTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementTypesIdUsagesEndpoint.py index 2c0be8247..d9e018de4 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementTypesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementTypesIdUsagesListEndpoint import ProcurementTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ProcurementTypesIdUsagesListEndpoint import ( + ProcurementTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ProcurementTypesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ProcurementTypesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ProcurementTypesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/types/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/types/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementTypesIdUsagesListEndpoint.py index 467746f10..bd896ffed 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ProcurementTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /procurement/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /procurement/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementTypesInfoCountEndpoint.py index 2d07f3d36..2459da7f9 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementTypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/types/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/types/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementTypesInfoEndpoint.py index c61be7142..aaaa4c98a 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementTypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementTypesInfoCountEndpoint import ProcurementTypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementTypesInfoCountEndpoint import ( + ProcurementTypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProcurementTypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProcurementTypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementTypesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductTypeInfo]: """ Performs a GET request against the /procurement/types/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductTypeInfo]: The parsed response data. """ - return self._parse_many(ProductTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProductTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresCountEndpoint.py index ed1ad204e..4bf7dc8cd 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementUnitofmeasuresCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/unitOfMeasures/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/unitOfMeasures/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresEndpoint.py index c84e48515..3e9d53c05 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresCountEndpoint import ProcurementUnitofmeasuresCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresIdEndpoint import ProcurementUnitofmeasuresIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresCountEndpoint import ( + ProcurementUnitofmeasuresCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresIdEndpoint import ( + ProcurementUnitofmeasuresIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnitOfMeasure from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProcurementUnitofmeasuresEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "unitOfMeasures", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProcurementUnitofmeasuresCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementUnitofmeasuresCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementUnitofmeasuresIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UnitOfMeasure]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UnitOfMeasure]: """ Performs a GET request against the /procurement/unitOfMeasures endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[UnitOfMeasure]: The parsed response data. """ - return self._parse_many(UnitOfMeasure, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + UnitOfMeasure, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnitOfMeasure: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnitOfMeasure: """ Performs a POST request against the /procurement/unitOfMeasures endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: UnitOfMeasure: The parsed response data. """ - return self._parse_one(UnitOfMeasure, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + UnitOfMeasure, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsCountEndpoint.py index 7c460b9c9..0b82ab80e 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementUnitofmeasuresIdConversionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/unitOfMeasures/{id}/conversions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/unitOfMeasures/{id}/conversions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsEndpoint.py index 63aee8d1b..388ab3298 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresIdConversionsCountEndpoint import \ - ProcurementUnitofmeasuresIdConversionsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresIdConversionsIdEndpoint import \ - ProcurementUnitofmeasuresIdConversionsIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresIdConversionsCountEndpoint import ( + ProcurementUnitofmeasuresIdConversionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresIdConversionsIdEndpoint import ( + ProcurementUnitofmeasuresIdConversionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Conversion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "conversions", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ProcurementUnitofmeasuresIdConversionsCountEndpoint(client, parent_endpoint=self) + ProcurementUnitofmeasuresIdConversionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementUnitofmeasuresIdConversionsIdEndpoint: @@ -27,11 +31,15 @@ def id(self, id: int) -> ProcurementUnitofmeasuresIdConversionsIdEndpoint: Returns: ProcurementUnitofmeasuresIdConversionsIdEndpoint: The initialized ProcurementUnitofmeasuresIdConversionsIdEndpoint object. """ - child = ProcurementUnitofmeasuresIdConversionsIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementUnitofmeasuresIdConversionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Conversion]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Conversion]: """ Performs a GET request against the /procurement/unitOfMeasures/{id}/conversions endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +60,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Conversion]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Conversion]: """ Performs a GET request against the /procurement/unitOfMeasures/{id}/conversions endpoint. @@ -62,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Conversion]: The parsed response data. """ - return self._parse_many(Conversion, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Conversion, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Conversion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Conversion: """ Performs a POST request against the /procurement/unitOfMeasures/{id}/conversions endpoint. @@ -74,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Conversion: The parsed response data. """ - return self._parse_one(Conversion, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Conversion, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsIdEndpoint.py index 5c268fd70..8f5e987c2 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdConversionsIdEndpoint.py @@ -10,7 +10,9 @@ class ProcurementUnitofmeasuresIdConversionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Conversion]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Conversion]: """ Performs a GET request against the /procurement/unitOfMeasures/{id}/conversions/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Conversion: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Conversion: """ Performs a GET request against the /procurement/unitOfMeasures/{id}/conversions/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Conversion: The parsed response data. """ - return self._parse_one(Conversion, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Conversion, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/unitOfMeasures/{id}/conversions/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Conversion: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Conversion: """ Performs a PUT request against the /procurement/unitOfMeasures/{id}/conversions/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Conversion: The parsed response data. """ - return self._parse_one(Conversion, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Conversion, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Conversion: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Conversion: """ Performs a PATCH request against the /procurement/unitOfMeasures/{id}/conversions/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Conversion: The parsed response data. """ - return self._parse_one(Conversion, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Conversion, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdEndpoint.py index ddafa5516..e80d22859 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementUnitOfMeasuresIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresIdConversionsEndpoint import \ - ProcurementUnitofmeasuresIdConversionsEndpoint +from pyconnectwise.endpoints.manage.ProcurementUnitofmeasuresIdConversionsEndpoint import ( + ProcurementUnitofmeasuresIdConversionsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UnitOfMeasure from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnitOfMeasure: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnitOfMeasure: """ Performs a GET request against the /procurement/unitOfMeasures/{id} endpoint. @@ -49,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UnitOfMeasure: The parsed response data. """ - return self._parse_one(UnitOfMeasure, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UnitOfMeasure, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/unitOfMeasures/{id} endpoint. @@ -61,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnitOfMeasure: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnitOfMeasure: """ Performs a PUT request against the /procurement/unitOfMeasures/{id} endpoint. @@ -73,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UnitOfMeasure: The parsed response data. """ - return self._parse_one(UnitOfMeasure, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + UnitOfMeasure, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UnitOfMeasure: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UnitOfMeasure: """ Performs a PATCH request against the /procurement/unitOfMeasures/{id} endpoint. @@ -85,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: UnitOfMeasure: The parsed response data. """ - return self._parse_one(UnitOfMeasure, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + UnitOfMeasure, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsCountEndpoint.py index 2e13356b2..3d76b601c 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementWarehousebinsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/warehouseBins/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/warehouseBins/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsEndpoint.py index ac06fab2d..b05da1ac3 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousebinsCountEndpoint import ProcurementWarehousebinsCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdEndpoint import ProcurementWarehousebinsIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousebinsInfoEndpoint import ProcurementWarehousebinsInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementWarehousebinsCountEndpoint import ( + ProcurementWarehousebinsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdEndpoint import ( + ProcurementWarehousebinsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementWarehousebinsInfoEndpoint import ( + ProcurementWarehousebinsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WarehouseBin from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementWarehousebinsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "warehouseBins", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementWarehousebinsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementWarehousebinsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementWarehousebinsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementWarehousebinsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementWarehousebinsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WarehouseBin]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WarehouseBin]: """ Performs a GET request against the /procurement/warehouseBins endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WarehouseBin]: The parsed response data. """ - return self._parse_many(WarehouseBin, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WarehouseBin, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WarehouseBin: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WarehouseBin: """ Performs a POST request against the /procurement/warehouseBins endpoint. @@ -74,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WarehouseBin: The parsed response data. """ - return self._parse_one(WarehouseBin, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + WarehouseBin, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdEndpoint.py index 2c90329c1..ec03c67b5 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdInfoEndpoint import ProcurementWarehousebinsIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdInventoryonhandEndpoint import \ - ProcurementWarehousebinsIdInventoryonhandEndpoint +from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdInfoEndpoint import ( + ProcurementWarehousebinsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdInventoryonhandEndpoint import ( + ProcurementWarehousebinsIdInventoryonhandEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WarehouseBin from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,9 +16,13 @@ class ProcurementWarehousebinsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementWarehousebinsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ProcurementWarehousebinsIdInfoEndpoint(client, parent_endpoint=self) + ) self.inventory_on_hand = self._register_child_endpoint( - ProcurementWarehousebinsIdInventoryonhandEndpoint(client, parent_endpoint=self) + ProcurementWarehousebinsIdInventoryonhandEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -41,7 +48,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WarehouseBin: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WarehouseBin: """ Performs a GET request against the /procurement/warehouseBins/{id} endpoint. @@ -51,9 +60,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WarehouseBin: The parsed response data. """ - return self._parse_one(WarehouseBin, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WarehouseBin, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/warehouseBins/{id} endpoint. @@ -63,9 +76,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WarehouseBin: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WarehouseBin: """ Performs a PUT request against the /procurement/warehouseBins/{id} endpoint. @@ -75,9 +93,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WarehouseBin: The parsed response data. """ - return self._parse_one(WarehouseBin, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + WarehouseBin, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WarehouseBin: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WarehouseBin: """ Performs a PATCH request against the /procurement/warehouseBins/{id} endpoint. @@ -87,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WarehouseBin: The parsed response data. """ - return self._parse_one(WarehouseBin, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + WarehouseBin, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInfoEndpoint.py index 93ff252c3..9301871cc 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WarehouseBinInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WarehouseBinInfo: """ Performs a GET request against the /procurement/warehouseBins/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WarehouseBinInfo: The parsed response data. """ - return self._parse_one(WarehouseBinInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WarehouseBinInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandCountEndpoint.py index 9f08ae7e7..b34f8b2fe 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementWarehousebinsIdInventoryonhandCountEndpoint(ConnectWiseEndpoint def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/warehouseBins/{id}/inventoryOnHand/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/warehouseBins/{id}/inventoryOnHand/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandEndpoint.py index e697da5fd..0cc67cda5 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdInventoryonhandCountEndpoint import \ - ProcurementWarehousebinsIdInventoryonhandCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdInventoryonhandIdEndpoint import \ - ProcurementWarehousebinsIdInventoryonhandIdEndpoint +from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdInventoryonhandCountEndpoint import ( + ProcurementWarehousebinsIdInventoryonhandCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementWarehousebinsIdInventoryonhandIdEndpoint import ( + ProcurementWarehousebinsIdInventoryonhandIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InventoryOnHand from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "inventoryOnHand", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ProcurementWarehousebinsIdInventoryonhandCountEndpoint(client, parent_endpoint=self) + ProcurementWarehousebinsIdInventoryonhandCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProcurementWarehousebinsIdInventoryonhandIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ProcurementWarehousebinsIdInventoryonhandIdEndpoint: Returns: ProcurementWarehousebinsIdInventoryonhandIdEndpoint: The initialized ProcurementWarehousebinsIdInventoryonhandIdEndpoint object. """ - child = ProcurementWarehousebinsIdInventoryonhandIdEndpoint(self.client, parent_endpoint=self) + child = ProcurementWarehousebinsIdInventoryonhandIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[InventoryOnHand]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[InventoryOnHand]: """ Performs a GET request against the /procurement/warehouseBins/{id}/inventoryOnHand endpoint. @@ -64,4 +72,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[InventoryOnHand]: The parsed response data. """ - return self._parse_many(InventoryOnHand, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + InventoryOnHand, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandIdEndpoint.py index 233096416..0b26c3f6a 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsIdInventoryOnHandIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InventoryOnHand: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InventoryOnHand: """ Performs a GET request against the /procurement/warehouseBins/{id}/inventoryOnHand/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InventoryOnHand: The parsed response data. """ - return self._parse_one(InventoryOnHand, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InventoryOnHand, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsInfoCountEndpoint.py index 5220e71b4..a4e406c8a 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementWarehousebinsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/warehouseBins/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/warehouseBins/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsInfoEndpoint.py index a77378018..e2685be1f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehouseBinsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousebinsInfoCountEndpoint import \ - ProcurementWarehousebinsInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementWarehousebinsInfoCountEndpoint import ( + ProcurementWarehousebinsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WarehouseBinInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WarehouseBinInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WarehouseBinInfo]: """ Performs a GET request against the /procurement/warehouseBins/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WarehouseBinInfo]: The parsed response data. """ - return self._parse_many(WarehouseBinInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WarehouseBinInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesCountEndpoint.py index e738ffc46..d2fe1389e 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementWarehousesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/warehouses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/warehouses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesEndpoint.py index 8b14f1f07..e6c31b686 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousesCountEndpoint import ProcurementWarehousesCountEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousesIdEndpoint import ProcurementWarehousesIdEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousesInfoEndpoint import ProcurementWarehousesInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementWarehousesCountEndpoint import ( + ProcurementWarehousesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementWarehousesIdEndpoint import ( + ProcurementWarehousesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProcurementWarehousesInfoEndpoint import ( + ProcurementWarehousesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Warehouse from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProcurementWarehousesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "warehouses", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementWarehousesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProcurementWarehousesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementWarehousesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProcurementWarehousesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProcurementWarehousesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ProcurementWarehousesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Warehouse]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Warehouse]: """ Performs a GET request against the /procurement/warehouses endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Warehouse]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Warehouse]: """ Performs a GET request against the /procurement/warehouses endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Warehouse]: The parsed response data. """ - return self._parse_many(Warehouse, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Warehouse, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Warehouse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Warehouse: """ Performs a POST request against the /procurement/warehouses endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Warehouse: The parsed response data. """ - return self._parse_one(Warehouse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Warehouse, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesIdEndpoint.py index eb215a373..873fc4448 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousesIdInfoEndpoint import ProcurementWarehousesIdInfoEndpoint +from pyconnectwise.endpoints.manage.ProcurementWarehousesIdInfoEndpoint import ( + ProcurementWarehousesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Warehouse from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ProcurementWarehousesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProcurementWarehousesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ProcurementWarehousesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Warehouse]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Warehouse]: """ Performs a GET request against the /procurement/warehouses/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Warehouse: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Warehouse: """ Performs a GET request against the /procurement/warehouses/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: Warehouse: The parsed response data. """ - return self._parse_one(Warehouse, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Warehouse, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /procurement/warehouses/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Warehouse: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Warehouse: """ Performs a PUT request against the /procurement/warehouses/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: Warehouse: The parsed response data. """ - return self._parse_one(Warehouse, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Warehouse, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Warehouse: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Warehouse: """ Performs a PATCH request against the /procurement/warehouses/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Warehouse: The parsed response data. """ - return self._parse_one(Warehouse, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Warehouse, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesIdInfoEndpoint.py index 50c5e657f..9a1d19dca 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WarehouseInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WarehouseInfo: """ Performs a GET request against the /procurement/warehouses/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WarehouseInfo: The parsed response data. """ - return self._parse_one(WarehouseInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WarehouseInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesInfoCountEndpoint.py index 71980d3d7..b7d1b470f 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProcurementWarehousesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /procurement/warehouses/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /procurement/warehouses/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesInfoEndpoint.py index b7b4853d9..dd095ab01 100644 --- a/src/pyconnectwise/endpoints/manage/ProcurementWarehousesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProcurementWarehousesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProcurementWarehousesInfoCountEndpoint import ProcurementWarehousesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProcurementWarehousesInfoCountEndpoint import ( + ProcurementWarehousesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WarehouseInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProcurementWarehousesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProcurementWarehousesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProcurementWarehousesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WarehouseInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WarehouseInfo]: """ Performs a GET request against the /procurement/warehouses/info endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WarehouseInfo]: The parsed response data. """ - return self._parse_many(WarehouseInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WarehouseInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBillingratesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBillingratesEndpoint.py index 660dad7ec..86019cf2a 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBillingratesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBillingratesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBillingratesIdEndpoint import ProjectBillingratesIdEndpoint +from pyconnectwise.endpoints.manage.ProjectBillingratesIdEndpoint import ( + ProjectBillingratesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdBillingratesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdBillingratesEndpoint.py index 51a929d6c..bb775e742 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdBillingratesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdBillingratesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBillingratesIdBillingratesIdEndpoint import \ - ProjectBillingratesIdBillingratesIdEndpoint +from pyconnectwise.endpoints.manage.ProjectBillingratesIdBillingratesIdEndpoint import ( + ProjectBillingratesIdBillingratesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> ProjectBillingratesIdBillingratesIdEndpoint: Returns: ProjectBillingratesIdBillingratesIdEndpoint: The initialized ProjectBillingratesIdBillingratesIdEndpoint object. """ - child = ProjectBillingratesIdBillingratesIdEndpoint(self.client, parent_endpoint=self) + child = ProjectBillingratesIdBillingratesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdBillingratesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdBillingratesIdEndpoint.py index 41450ca28..5a5c3df5e 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdBillingratesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdBillingratesIdEndpoint.py @@ -10,7 +10,9 @@ class ProjectBillingratesIdBillingratesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBillingRate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBillingRate: """ Performs a PATCH request against the /project/billingRates/{id}/billingRates/{id} endpoint. @@ -20,4 +22,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectBillingRate: The parsed response data. """ - return self._parse_one(ProjectBillingRate, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectBillingRate, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdEndpoint.py index 30b405415..49e089b71 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBillingratesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBillingratesIdBillingratesEndpoint import \ - ProjectBillingratesIdBillingratesEndpoint +from pyconnectwise.endpoints.manage.ProjectBillingratesIdBillingratesEndpoint import ( + ProjectBillingratesIdBillingratesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsEndpoint.py index facd35b15..3f2f412a7 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBoardsIdEndpoint import ProjectBoardsIdEndpoint +from pyconnectwise.endpoints.manage.ProjectBoardsIdEndpoint import ( + ProjectBoardsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdEndpoint.py index cd0ca9efd..1776b2456 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsEndpoint import ProjectBoardsIdTeamsEndpoint +from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsEndpoint import ( + ProjectBoardsIdTeamsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ProjectBoardsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.teams = self._register_child_endpoint(ProjectBoardsIdTeamsEndpoint(client, parent_endpoint=self)) + self.teams = self._register_child_endpoint( + ProjectBoardsIdTeamsEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsCountEndpoint.py index b95fcc28b..b7f021155 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectBoardsIdTeamsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/boards/{id}/teams/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/boards/{id}/teams/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsEndpoint.py index 684ced462..0881daa6a 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsCountEndpoint import ProjectBoardsIdTeamsCountEndpoint -from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdEndpoint import ProjectBoardsIdTeamsIdEndpoint -from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsInfoEndpoint import ProjectBoardsIdTeamsInfoEndpoint +from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsCountEndpoint import ( + ProjectBoardsIdTeamsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdEndpoint import ( + ProjectBoardsIdTeamsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsInfoEndpoint import ( + ProjectBoardsIdTeamsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectBoardTeam from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProjectBoardsIdTeamsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "teams", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProjectBoardsIdTeamsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProjectBoardsIdTeamsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectBoardsIdTeamsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProjectBoardsIdTeamsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectBoardsIdTeamsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectBoardTeam]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectBoardTeam]: """ Performs a GET request against the /project/boards/{id}/teams endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectBoardTeam]: The parsed response data. """ - return self._parse_many(ProjectBoardTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectBoardTeam, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBoardTeam: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBoardTeam: """ Performs a POST request against the /project/boards/{id}/teams endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectBoardTeam: The parsed response data. """ - return self._parse_one(ProjectBoardTeam, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectBoardTeam, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdEndpoint.py index 702389e46..5c85364c9 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdInfoEndpoint import ProjectBoardsIdTeamsIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdMembersEndpoint import ProjectBoardsIdTeamsIdMembersEndpoint +from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdInfoEndpoint import ( + ProjectBoardsIdTeamsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdMembersEndpoint import ( + ProjectBoardsIdTeamsIdMembersEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectBoardTeam from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,12 @@ class ProjectBoardsIdTeamsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProjectBoardsIdTeamsIdInfoEndpoint(client, parent_endpoint=self)) self.members = self._register_child_endpoint( ProjectBoardsIdTeamsIdMembersEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ProjectBoardsIdTeamsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -40,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBoardTeam: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBoardTeam: """ Performs a GET request against the /project/boards/{id}/teams/{id} endpoint. @@ -50,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectBoardTeam: The parsed response data. """ - return self._parse_one(ProjectBoardTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectBoardTeam, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/boards/{id}/teams/{id} endpoint. @@ -62,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBoardTeam: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBoardTeam: """ Performs a PUT request against the /project/boards/{id}/teams/{id} endpoint. @@ -74,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectBoardTeam: The parsed response data. """ - return self._parse_one(ProjectBoardTeam, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectBoardTeam, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBoardTeam: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBoardTeam: """ Performs a PATCH request against the /project/boards/{id}/teams/{id} endpoint. @@ -86,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectBoardTeam: The parsed response data. """ - return self._parse_one(ProjectBoardTeam, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectBoardTeam, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdInfoCountEndpoint.py index 1e29ec92d..335a1b0c8 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectBoardsIdTeamsIdInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/boards/{id}/teams/{id}/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/boards/{id}/teams/{id}/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdInfoEndpoint.py index 599af47a6..9fbdecb55 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdInfoCountEndpoint import \ - ProjectBoardsIdTeamsIdInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdInfoCountEndpoint import ( + ProjectBoardsIdTeamsIdInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectBoardTeamInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBoardTeamInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBoardTeamInfo: """ Performs a GET request against the /project/boards/{id}/teams/{id}/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectBoardTeamInfo: The parsed response data. """ - return self._parse_one(ProjectBoardTeamInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectBoardTeamInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdMembersEndpoint.py index 7165d58c6..5975061be 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdMembersEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdMembersIdEndpoint import \ - ProjectBoardsIdTeamsIdMembersIdEndpoint +from pyconnectwise.endpoints.manage.ProjectBoardsIdTeamsIdMembersIdEndpoint import ( + ProjectBoardsIdTeamsIdMembersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectBoardTeamMember from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,7 +22,9 @@ def id(self, id: int) -> ProjectBoardsIdTeamsIdMembersIdEndpoint: Returns: ProjectBoardsIdTeamsIdMembersIdEndpoint: The initialized ProjectBoardsIdTeamsIdMembersIdEndpoint object. """ - child = ProjectBoardsIdTeamsIdMembersIdEndpoint(self.client, parent_endpoint=self) + child = ProjectBoardsIdTeamsIdMembersIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -48,7 +51,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectBoardTeamMember]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectBoardTeamMember]: """ Performs a GET request against the /project/boards/{id}/teams/{id}/members endpoint. @@ -58,9 +63,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectBoardTeamMember]: The parsed response data. """ - return self._parse_many(ProjectBoardTeamMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectBoardTeamMember, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBoardTeamMember: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBoardTeamMember: """ Performs a POST request against the /project/boards/{id}/teams/{id}/members endpoint. @@ -70,4 +80,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectBoardTeamMember: The parsed response data. """ - return self._parse_one(ProjectBoardTeamMember, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectBoardTeamMember, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdMembersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdMembersIdEndpoint.py index 3c67ecea0..56c2e5cbd 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdMembersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsIdMembersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBoardTeamMember: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBoardTeamMember: """ Performs a GET request against the /project/boards/{id}/teams/{id}/members/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectBoardTeamMember: The parsed response data. """ - return self._parse_one(ProjectBoardTeamMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectBoardTeamMember, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/boards/{id}/teams/{id}/members/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBoardTeamMember: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBoardTeamMember: """ Performs a PUT request against the /project/boards/{id}/teams/{id}/members/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectBoardTeamMember: The parsed response data. """ - return self._parse_one(ProjectBoardTeamMember, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectBoardTeamMember, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBoardTeamMember: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBoardTeamMember: """ Performs a PATCH request against the /project/boards/{id}/teams/{id}/members/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectBoardTeamMember: The parsed response data. """ - return self._parse_one(ProjectBoardTeamMember, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectBoardTeamMember, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsInfoEndpoint.py index 652e867f9..992c23e3c 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectBoardsIdTeamsInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectBoardTeamInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectBoardTeamInfo]: """ Performs a GET request against the /project/boards/{id}/teams/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectBoardTeamInfo]: The parsed response data. """ - return self._parse_many(ProjectBoardTeamInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectBoardTeamInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectEndpoint.py index ae820c7b6..44cc48c56 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectEndpoint.py @@ -1,17 +1,35 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectBillingratesEndpoint import ProjectBillingratesEndpoint +from pyconnectwise.endpoints.manage.ProjectBillingratesEndpoint import ( + ProjectBillingratesEndpoint, +) from pyconnectwise.endpoints.manage.ProjectBoardsEndpoint import ProjectBoardsEndpoint from pyconnectwise.endpoints.manage.ProjectIdEndpoint import ProjectIdEndpoint -from pyconnectwise.endpoints.manage.ProjectPhasestatusesEndpoint import ProjectPhasestatusesEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsEndpoint import ProjectProjectsEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesEndpoint import ProjectProjecttemplatesEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttypesEndpoint import ProjectProjecttypesEndpoint -from pyconnectwise.endpoints.manage.ProjectSecurityrolesEndpoint import ProjectSecurityrolesEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusesEndpoint import ProjectStatusesEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusindicatorsEndpoint import ProjectStatusindicatorsEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketnoteEndpoint import ProjectTicketnoteEndpoint +from pyconnectwise.endpoints.manage.ProjectPhasestatusesEndpoint import ( + ProjectPhasestatusesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsEndpoint import ( + ProjectProjectsEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesEndpoint import ( + ProjectProjecttemplatesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjecttypesEndpoint import ( + ProjectProjecttypesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectSecurityrolesEndpoint import ( + ProjectSecurityrolesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectStatusesEndpoint import ( + ProjectStatusesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectStatusindicatorsEndpoint import ( + ProjectStatusindicatorsEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketnoteEndpoint import ( + ProjectTicketnoteEndpoint, +) from pyconnectwise.endpoints.manage.ProjectTicketsEndpoint import ProjectTicketsEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,21 +39,39 @@ class ProjectEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "project", parent_endpoint=parent_endpoint) - self.phase_statuses = self._register_child_endpoint(ProjectPhasestatusesEndpoint(client, parent_endpoint=self)) - self.security_roles = self._register_child_endpoint(ProjectSecurityrolesEndpoint(client, parent_endpoint=self)) - self.project_types = self._register_child_endpoint(ProjectProjecttypesEndpoint(client, parent_endpoint=self)) - self.billing_rates = self._register_child_endpoint(ProjectBillingratesEndpoint(client, parent_endpoint=self)) - self.project_templates = self._register_child_endpoint( - ProjectProjecttemplatesEndpoint(client, parent_endpoint=self) + self.projects = self._register_child_endpoint( + ProjectProjectsEndpoint(client, parent_endpoint=self) + ) + self.phase_statuses = self._register_child_endpoint( + ProjectPhasestatusesEndpoint(client, parent_endpoint=self) ) - self.ticket_note = self._register_child_endpoint(ProjectTicketnoteEndpoint(client, parent_endpoint=self)) - self.projects = self._register_child_endpoint(ProjectProjectsEndpoint(client, parent_endpoint=self)) - self.tickets = self._register_child_endpoint(ProjectTicketsEndpoint(client, parent_endpoint=self)) - self.boards = self._register_child_endpoint(ProjectBoardsEndpoint(client, parent_endpoint=self)) self.status_indicators = self._register_child_endpoint( ProjectStatusindicatorsEndpoint(client, parent_endpoint=self) ) - self.statuses = self._register_child_endpoint(ProjectStatusesEndpoint(client, parent_endpoint=self)) + self.project_templates = self._register_child_endpoint( + ProjectProjecttemplatesEndpoint(client, parent_endpoint=self) + ) + self.tickets = self._register_child_endpoint( + ProjectTicketsEndpoint(client, parent_endpoint=self) + ) + self.security_roles = self._register_child_endpoint( + ProjectSecurityrolesEndpoint(client, parent_endpoint=self) + ) + self.boards = self._register_child_endpoint( + ProjectBoardsEndpoint(client, parent_endpoint=self) + ) + self.project_types = self._register_child_endpoint( + ProjectProjecttypesEndpoint(client, parent_endpoint=self) + ) + self.ticket_note = self._register_child_endpoint( + ProjectTicketnoteEndpoint(client, parent_endpoint=self) + ) + self.statuses = self._register_child_endpoint( + ProjectStatusesEndpoint(client, parent_endpoint=self) + ) + self.billing_rates = self._register_child_endpoint( + ProjectBillingratesEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesCountEndpoint.py index e8911e6ca..f2bbf1a81 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectIdBillingratesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/{id}/billingRates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/{id}/billingRates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesEndpoint.py index 8338c08e8..85dd6a7ed 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectIdBillingratesCountEndpoint import ProjectIdBillingratesCountEndpoint -from pyconnectwise.endpoints.manage.ProjectIdBillingratesIdEndpoint import ProjectIdBillingratesIdEndpoint +from pyconnectwise.endpoints.manage.ProjectIdBillingratesCountEndpoint import ( + ProjectIdBillingratesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectIdBillingratesIdEndpoint import ( + ProjectIdBillingratesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectBillingRate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProjectIdBillingratesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "billingRates", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectIdBillingratesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectIdBillingratesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectIdBillingratesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectBillingRate]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectBillingRate]: """ Performs a GET request against the /project/{id}/billingRates endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectBillingRate]: The parsed response data. """ - return self._parse_many(ProjectBillingRate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectBillingRate, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBillingRate: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBillingRate: """ Performs a POST request against the /project/{id}/billingRates endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectBillingRate: The parsed response data. """ - return self._parse_one(ProjectBillingRate, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectBillingRate, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesIdEndpoint.py index ed8320fa2..6488d2b65 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectIdBillingratesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBillingRate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBillingRate: """ Performs a GET request against the /project/{id}/billingRates/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectBillingRate: The parsed response data. """ - return self._parse_one(ProjectBillingRate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectBillingRate, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/{id}/billingRates/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectBillingRate: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectBillingRate: """ Performs a PUT request against the /project/{id}/billingRates/{id} endpoint. @@ -67,4 +79,7 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectBillingRate: The parsed response data. """ - return self._parse_one(ProjectBillingRate, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectBillingRate, + super()._make_request("PUT", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectIdEndpoint.py index 62b3d1467..dcc162a80 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectIdBillingratesEndpoint import ProjectIdBillingratesEndpoint +from pyconnectwise.endpoints.manage.ProjectIdBillingratesEndpoint import ( + ProjectIdBillingratesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ProjectIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.billing_rates = self._register_child_endpoint(ProjectIdBillingratesEndpoint(client, parent_endpoint=self)) + self.billing_rates = self._register_child_endpoint( + ProjectIdBillingratesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesCountEndpoint.py index 1930bbff3..b1730190d 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectPhasestatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/phaseStatuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/phaseStatuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesEndpoint.py index 284d37559..efd4e9a8f 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectPhasestatusesCountEndpoint import ProjectPhasestatusesCountEndpoint -from pyconnectwise.endpoints.manage.ProjectPhasestatusesIdEndpoint import ProjectPhasestatusesIdEndpoint +from pyconnectwise.endpoints.manage.ProjectPhasestatusesCountEndpoint import ( + ProjectPhasestatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectPhasestatusesIdEndpoint import ( + ProjectPhasestatusesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PhaseStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProjectPhasestatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "phaseStatuses", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectPhasestatusesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectPhasestatusesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectPhasestatusesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ProjectPhasestatusesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[PhaseStatus]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[PhaseStatus]: """ Performs a GET request against the /project/phaseStatuses endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PhaseStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PhaseStatus]: """ Performs a GET request against the /project/phaseStatuses endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PhaseStatus]: The parsed response data. """ - return self._parse_many(PhaseStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PhaseStatus, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PhaseStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PhaseStatus: """ Performs a POST request against the /project/phaseStatuses endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PhaseStatus: The parsed response data. """ - return self._parse_one(PhaseStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PhaseStatus, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdEndpoint.py index 304394c63..5fb79f653 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectPhasestatusesIdUsagesEndpoint import ProjectPhasestatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ProjectPhasestatusesIdUsagesEndpoint import ( + ProjectPhasestatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PhaseStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ProjectPhasestatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.usages = self._register_child_endpoint(ProjectPhasestatusesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ProjectPhasestatusesIdUsagesEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[PhaseStatus]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[PhaseStatus]: """ Performs a GET request against the /project/phaseStatuses/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PhaseStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PhaseStatus: """ Performs a GET request against the /project/phaseStatuses/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PhaseStatus: The parsed response data. """ - return self._parse_one(PhaseStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PhaseStatus, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/phaseStatuses/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PhaseStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PhaseStatus: """ Performs a PUT request against the /project/phaseStatuses/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PhaseStatus: The parsed response data. """ - return self._parse_one(PhaseStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PhaseStatus, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PhaseStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PhaseStatus: """ Performs a PATCH request against the /project/phaseStatuses/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PhaseStatus: The parsed response data. """ - return self._parse_one(PhaseStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PhaseStatus, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdUsagesEndpoint.py index abcaf6080..e15101c8b 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectPhasestatusesIdUsagesListEndpoint import \ - ProjectPhasestatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ProjectPhasestatusesIdUsagesListEndpoint import ( + ProjectPhasestatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ProjectPhasestatusesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /project/phaseStatuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /project/phaseStatuses/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdUsagesListEndpoint.py index 8b4d27f95..0c92a8e9c 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectPhaseStatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ProjectPhasestatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /project/phaseStatuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /project/phaseStatuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesCountEndpoint.py index f50717e41..774019b97 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjecttypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projectTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projectTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesEndpoint.py index c4125b153..662305ccf 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttypesCountEndpoint import ProjectProjecttypesCountEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttypesIdEndpoint import ProjectProjecttypesIdEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttypesInfoEndpoint import ProjectProjecttypesInfoEndpoint +from pyconnectwise.endpoints.manage.ProjectProjecttypesCountEndpoint import ( + ProjectProjecttypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjecttypesIdEndpoint import ( + ProjectProjecttypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjecttypesInfoEndpoint import ( + ProjectProjecttypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProjectProjecttypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "projectTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProjectProjecttypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProjectProjecttypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectProjecttypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProjectProjecttypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectProjecttypesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ProjectProjecttypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProjectType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProjectType]: """ Performs a GET request against the /project/projectTypes endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectType]: """ Performs a GET request against the /project/projectTypes endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectType]: The parsed response data. """ - return self._parse_many(ProjectType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectType: """ Performs a POST request against the /project/projectTypes endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectType: The parsed response data. """ - return self._parse_one(ProjectType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdEndpoint.py index d69ca3f6c..8653355a4 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttypesIdInfoEndpoint import ProjectProjecttypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttypesIdUsagesEndpoint import ProjectProjecttypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ProjectProjecttypesIdInfoEndpoint import ( + ProjectProjecttypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjecttypesIdUsagesEndpoint import ( + ProjectProjecttypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class ProjectProjecttypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProjectProjecttypesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ProjectProjecttypesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ProjectProjecttypesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProjectProjecttypesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProjectType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProjectType]: """ Performs a GET request against the /project/projectTypes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectType: """ Performs a GET request against the /project/projectTypes/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectType: The parsed response data. """ - return self._parse_one(ProjectType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/projectTypes/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectType: """ Performs a PUT request against the /project/projectTypes/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectType: The parsed response data. """ - return self._parse_one(ProjectType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectType: """ Performs a PATCH request against the /project/projectTypes/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectType: The parsed response data. """ - return self._parse_one(ProjectType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdInfoEndpoint.py index 3ac37d805..eb222b1cb 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTypeInfo: """ Performs a GET request against the /project/projectTypes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTypeInfo: The parsed response data. """ - return self._parse_one(ProjectTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdUsagesEndpoint.py index b4bfc3609..39bd94753 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttypesIdUsagesListEndpoint import \ - ProjectProjecttypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ProjectProjecttypesIdUsagesListEndpoint import ( + ProjectProjecttypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,9 +13,13 @@ class ProjectProjecttypesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ProjectProjecttypesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ProjectProjecttypesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /project/projectTypes/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -35,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /project/projectTypes/{id}/usages endpoint. @@ -45,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdUsagesListEndpoint.py index 86dc5a3da..613abd244 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjecttypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /project/projectTypes/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /project/projectTypes/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesInfoCountEndpoint.py index 61a01686c..ecf02461f 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjecttypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projectTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projectTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesInfoEndpoint.py index e916d6c07..765aa22b7 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectTypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttypesInfoCountEndpoint import ProjectProjecttypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProjectProjecttypesInfoCountEndpoint import ( + ProjectProjecttypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProjectProjecttypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectProjecttypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectProjecttypesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectTypeInfo]: """ Performs a GET request against the /project/projectTypes/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectTypeInfo]: The parsed response data. """ - return self._parse_many(ProjectTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsCountEndpoint.py index c1dffe8c0..ac3d0dece 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjectsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projects/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projects/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsEndpoint.py index 2c39ecf9f..a23bcaddc 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsCountEndpoint import ProjectProjectsCountEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdEndpoint import ProjectProjectsIdEndpoint +from pyconnectwise.endpoints.manage.ProjectProjectsCountEndpoint import ( + ProjectProjectsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsIdEndpoint import ( + ProjectProjectsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Project from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProjectProjectsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "projects", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectProjectsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectProjectsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectProjectsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ProjectProjectsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Project]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Project]: """ Performs a GET request against the /project/projects endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Project]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Project]: """ Performs a GET request against the /project/projects endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Project]: The parsed response data. """ - return self._parse_many(Project, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Project, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Project: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Project: """ Performs a POST request against the /project/projects endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Project: The parsed response data. """ - return self._parse_one(Project, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Project, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdContactsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdContactsEndpoint.py index 22af68f67..919a5061d 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdContactsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdContactsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdContactsIdEndpoint import ProjectProjectsIdContactsIdEndpoint +from pyconnectwise.endpoints.manage.ProjectProjectsIdContactsIdEndpoint import ( + ProjectProjectsIdContactsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectContact from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -47,7 +49,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectContact]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectContact]: """ Performs a GET request against the /project/projects/{id}/contacts endpoint. @@ -57,9 +61,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectContact]: The parsed response data. """ - return self._parse_many(ProjectContact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectContact, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectContact: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectContact: """ Performs a POST request against the /project/projects/{id}/contacts endpoint. @@ -69,4 +78,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectContact: The parsed response data. """ - return self._parse_one(ProjectContact, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectContact, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdContactsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdContactsIdEndpoint.py index f0ec14724..694bbae67 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdContactsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdContactsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectContact: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectContact: """ Performs a GET request against the /project/projects/{id}/contacts/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectContact: The parsed response data. """ - return self._parse_one(ProjectContact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectContact, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/projects/{id}/contacts/{id} endpoint. @@ -55,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdEndpoint.py index 087de5788..7d0759c92 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdEndpoint.py @@ -1,12 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdContactsEndpoint import ProjectProjectsIdContactsEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdNotesEndpoint import ProjectProjectsIdNotesEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdPhasesEndpoint import ProjectProjectsIdPhasesEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdProjectworkplanEndpoint import \ - ProjectProjectsIdProjectworkplanEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdTeammembersEndpoint import ProjectProjectsIdTeammembersEndpoint +from pyconnectwise.endpoints.manage.ProjectProjectsIdContactsEndpoint import ( + ProjectProjectsIdContactsEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsIdNotesEndpoint import ( + ProjectProjectsIdNotesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsIdPhasesEndpoint import ( + ProjectProjectsIdPhasesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsIdProjectworkplanEndpoint import ( + ProjectProjectsIdProjectworkplanEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsIdTeammembersEndpoint import ( + ProjectProjectsIdTeammembersEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Project from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,17 +25,25 @@ class ProjectProjectsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.phases = self._register_child_endpoint(ProjectProjectsIdPhasesEndpoint(client, parent_endpoint=self)) + self.phases = self._register_child_endpoint( + ProjectProjectsIdPhasesEndpoint(client, parent_endpoint=self) + ) + self.notes = self._register_child_endpoint( + ProjectProjectsIdNotesEndpoint(client, parent_endpoint=self) + ) self.project_workplan = self._register_child_endpoint( ProjectProjectsIdProjectworkplanEndpoint(client, parent_endpoint=self) ) - self.notes = self._register_child_endpoint(ProjectProjectsIdNotesEndpoint(client, parent_endpoint=self)) - self.contacts = self._register_child_endpoint(ProjectProjectsIdContactsEndpoint(client, parent_endpoint=self)) + self.contacts = self._register_child_endpoint( + ProjectProjectsIdContactsEndpoint(client, parent_endpoint=self) + ) self.team_members = self._register_child_endpoint( ProjectProjectsIdTeammembersEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Project]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Project]: """ Performs a GET request against the /project/projects/{id} endpoint and returns an initialized PaginatedResponse object. @@ -47,7 +64,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Project: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Project: """ Performs a GET request against the /project/projects/{id} endpoint. @@ -57,9 +76,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: Project: The parsed response data. """ - return self._parse_one(Project, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Project, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/projects/{id} endpoint. @@ -69,9 +92,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Project: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Project: """ Performs a PUT request against the /project/projects/{id} endpoint. @@ -81,9 +109,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: Project: The parsed response data. """ - return self._parse_one(Project, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Project, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Project: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Project: """ Performs a PATCH request against the /project/projects/{id} endpoint. @@ -93,4 +125,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Project: The parsed response data. """ - return self._parse_one(Project, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Project, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesCountEndpoint.py index 2fea44985..f1161f31c 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjectsIdNotesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projects/{id}/notes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projects/{id}/notes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesEndpoint.py index fca21a2be..9ff7609e2 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdNotesCountEndpoint import ProjectProjectsIdNotesCountEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdNotesIdEndpoint import ProjectProjectsIdNotesIdEndpoint +from pyconnectwise.endpoints.manage.ProjectProjectsIdNotesCountEndpoint import ( + ProjectProjectsIdNotesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsIdNotesIdEndpoint import ( + ProjectProjectsIdNotesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectNote from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProjectProjectsIdNotesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "notes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectProjectsIdNotesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectProjectsIdNotesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectProjectsIdNotesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ProjectProjectsIdNotesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProjectNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProjectNote]: """ Performs a GET request against the /project/projects/{id}/notes endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectNote]: """ Performs a GET request against the /project/projects/{id}/notes endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectNote]: The parsed response data. """ - return self._parse_many(ProjectNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectNote, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectNote: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectNote: """ Performs a POST request against the /project/projects/{id}/notes endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectNote: The parsed response data. """ - return self._parse_one(ProjectNote, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectNote, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesIdEndpoint.py index 285cb16f1..d4370d896 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdNotesIdEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjectsIdNotesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ProjectNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ProjectNote]: """ Performs a GET request against the /project/projects/{id}/notes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectNote: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectNote: """ Performs a GET request against the /project/projects/{id}/notes/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectNote: The parsed response data. """ - return self._parse_one(ProjectNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectNote, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/projects/{id}/notes/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectNote: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectNote: """ Performs a PUT request against the /project/projects/{id}/notes/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectNote: The parsed response data. """ - return self._parse_one(ProjectNote, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectNote, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectNote: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectNote: """ Performs a PATCH request against the /project/projects/{id}/notes/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectNote: The parsed response data. """ - return self._parse_one(ProjectNote, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectNote, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesCountEndpoint.py index ccbf2348f..f7f5ee828 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjectsIdPhasesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projects/{id}/phases/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projects/{id}/phases/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesEndpoint.py index 82cd10e11..207c81118 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdPhasesCountEndpoint import ProjectProjectsIdPhasesCountEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdPhasesIdEndpoint import ProjectProjectsIdPhasesIdEndpoint +from pyconnectwise.endpoints.manage.ProjectProjectsIdPhasesCountEndpoint import ( + ProjectProjectsIdPhasesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsIdPhasesIdEndpoint import ( + ProjectProjectsIdPhasesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectPhase from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProjectProjectsIdPhasesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "phases", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectProjectsIdPhasesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectProjectsIdPhasesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectProjectsIdPhasesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectPhase]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectPhase]: """ Performs a GET request against the /project/projects/{id}/phases endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectPhase]: The parsed response data. """ - return self._parse_many(ProjectPhase, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectPhase, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectPhase: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectPhase: """ Performs a POST request against the /project/projects/{id}/phases endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectPhase: The parsed response data. """ - return self._parse_one(ProjectPhase, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectPhase, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesIdEndpoint.py index 5bdd6ec32..458405891 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdPhasesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectPhase: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectPhase: """ Performs a GET request against the /project/projects/{id}/phases/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectPhase: The parsed response data. """ - return self._parse_one(ProjectPhase, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectPhase, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/projects/{id}/phases/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectPhase: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectPhase: """ Performs a PUT request against the /project/projects/{id}/phases/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectPhase: The parsed response data. """ - return self._parse_one(ProjectPhase, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectPhase, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectPhase: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectPhase: """ Performs a PATCH request against the /project/projects/{id}/phases/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectPhase: The parsed response data. """ - return self._parse_one(ProjectPhase, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectPhase, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanCountEndpoint.py index 98f2bf576..5b3cf4a2a 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjectsIdProjectworkplanCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projects/{id}/projectWorkplan/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projects/{id}/projectWorkplan/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanEndpoint.py index 8654d461e..6adcd6e42 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdProjectworkplanCountEndpoint import \ - ProjectProjectsIdProjectworkplanCountEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdProjectworkplanIdEndpoint import \ - ProjectProjectsIdProjectworkplanIdEndpoint +from pyconnectwise.endpoints.manage.ProjectProjectsIdProjectworkplanCountEndpoint import ( + ProjectProjectsIdProjectworkplanCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsIdProjectworkplanIdEndpoint import ( + ProjectProjectsIdProjectworkplanIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectWorkplan from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ProjectProjectsIdProjectworkplanIdEndpoint: Returns: ProjectProjectsIdProjectworkplanIdEndpoint: The initialized ProjectProjectsIdProjectworkplanIdEndpoint object. """ - child = ProjectProjectsIdProjectworkplanIdEndpoint(self.client, parent_endpoint=self) + child = ProjectProjectsIdProjectworkplanIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectWorkplan]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectWorkplan]: """ Performs a GET request against the /project/projects/{id}/projectWorkplan endpoint. @@ -64,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectWorkplan]: The parsed response data. """ - return self._parse_many(ProjectWorkplan, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectWorkplan, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanIdEndpoint.py index 56274909b..7b9af5b9e 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdProjectworkplanIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectWorkplan: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectWorkplan: """ Performs a GET request against the /project/projects/{id}/projectWorkplan/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectWorkplan: The parsed response data. """ - return self._parse_one(ProjectWorkplan, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectWorkplan, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersCountEndpoint.py index 45c530dcf..42cf275bc 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjectsIdTeammembersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projects/{id}/teamMembers/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projects/{id}/teamMembers/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersEndpoint.py index d8505d9c0..72d3ad4d4 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdTeammembersCountEndpoint import \ - ProjectProjectsIdTeammembersCountEndpoint -from pyconnectwise.endpoints.manage.ProjectProjectsIdTeammembersIdEndpoint import ProjectProjectsIdTeammembersIdEndpoint +from pyconnectwise.endpoints.manage.ProjectProjectsIdTeammembersCountEndpoint import ( + ProjectProjectsIdTeammembersCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjectsIdTeammembersIdEndpoint import ( + ProjectProjectsIdTeammembersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectTeamMember from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> ProjectProjectsIdTeammembersIdEndpoint: Returns: ProjectProjectsIdTeammembersIdEndpoint: The initialized ProjectProjectsIdTeammembersIdEndpoint object. """ - child = ProjectProjectsIdTeammembersIdEndpoint(self.client, parent_endpoint=self) + child = ProjectProjectsIdTeammembersIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectTeamMember]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectTeamMember]: """ Performs a GET request against the /project/projects/{id}/teamMembers endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectTeamMember]: The parsed response data. """ - return self._parse_many(ProjectTeamMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectTeamMember, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTeamMember: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTeamMember: """ Performs a POST request against the /project/projects/{id}/teamMembers endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectTeamMember: The parsed response data. """ - return self._parse_one(ProjectTeamMember, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectTeamMember, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersIdEndpoint.py index a66c99b11..638aef18b 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjectsIdTeamMembersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTeamMember: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTeamMember: """ Performs a GET request against the /project/projects/{id}/teamMembers/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTeamMember: The parsed response data. """ - return self._parse_one(ProjectTeamMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectTeamMember, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/projects/{id}/teamMembers/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTeamMember: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTeamMember: """ Performs a PUT request against the /project/projects/{id}/teamMembers/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTeamMember: The parsed response data. """ - return self._parse_one(ProjectTeamMember, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectTeamMember, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTeamMember: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTeamMember: """ Performs a PATCH request against the /project/projects/{id}/teamMembers/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectTeamMember: The parsed response data. """ - return self._parse_one(ProjectTeamMember, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectTeamMember, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesCountEndpoint.py index c05b63e44..d56cd3159 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjecttemplatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projectTemplates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projectTemplates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesEndpoint.py index 827cffb55..c7739a9de 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesCountEndpoint import ProjectProjecttemplatesCountEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdEndpoint import ProjectProjecttemplatesIdEndpoint +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesCountEndpoint import ( + ProjectProjecttemplatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdEndpoint import ( + ProjectProjecttemplatesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class ProjectProjecttemplatesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "projectTemplates", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectProjecttemplatesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectProjecttemplatesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectProjecttemplatesIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdEndpoint.py index a21ff6e22..52c7c5266 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsEndpoint import \ - ProjectProjecttemplatesIdProjecttemplateticketsEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdWorkplanEndpoint import \ - ProjectProjecttemplatesIdWorkplanEndpoint +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsEndpoint import ( + ProjectProjecttemplatesIdProjecttemplateticketsEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdWorkplanEndpoint import ( + ProjectProjecttemplatesIdWorkplanEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,12 +16,14 @@ class ProjectProjecttemplatesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) + self.project_template_tickets = self._register_child_endpoint( + ProjectProjecttemplatesIdProjecttemplateticketsEndpoint( + client, parent_endpoint=self + ) + ) self.workplan = self._register_child_endpoint( ProjectProjecttemplatesIdWorkplanEndpoint(client, parent_endpoint=self) ) - self.project_template_tickets = self._register_child_endpoint( - ProjectProjecttemplatesIdProjecttemplateticketsEndpoint(client, parent_endpoint=self) - ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -44,7 +48,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplate: """ Performs a GET request against the /project/projectTemplates/{id} endpoint. @@ -54,9 +60,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTemplate: The parsed response data. """ - return self._parse_one(ProjectTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/projectTemplates/{id} endpoint. @@ -66,9 +77,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplate: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplate: """ Performs a PUT request against the /project/projectTemplates/{id} endpoint. @@ -78,9 +94,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTemplate: The parsed response data. """ - return self._parse_one(ProjectTemplate, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectTemplate, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplate: """ Performs a PATCH request against the /project/projectTemplates/{id} endpoint. @@ -90,4 +111,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectTemplate: The parsed response data. """ - return self._parse_one(ProjectTemplate, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectTemplate, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint.py index d671e3fe1..1e36b442d 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint(ConnectWiseEn def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projectTemplates/{id}/projectTemplateTickets/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projectTemplates/{id}/projectTemplateTickets/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsEndpoint.py index 671faef6d..4b13d60eb 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint import \ - ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint import \ - ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint import ( + ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint import ( + ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectTemplateTicket from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class ProjectProjecttemplatesIdProjecttemplateticketsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "projectTemplateTickets", parent_endpoint=parent_endpoint) + super().__init__( + client, "projectTemplateTickets", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint(client, parent_endpoint=self) + ProjectProjecttemplatesIdProjecttemplateticketsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoi Returns: ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint: The initialized ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint object. """ - child = ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint(self.client, parent_endpoint=self) + child = ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectTemplateTicket]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectTemplateTicket]: """ Performs a GET request against the /project/projectTemplates/{id}/projectTemplateTickets endpoint. @@ -64,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectTemplateTicket]: The parsed response data. """ - return self._parse_many(ProjectTemplateTicket, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectTemplateTicket, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplateTicket: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplateTicket: """ Performs a POST request against the /project/projectTemplates/{id}/projectTemplateTickets endpoint. @@ -76,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectTemplateTicket: The parsed response data. """ - return self._parse_one(ProjectTemplateTicket, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectTemplateTicket, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint.py index c308b7c80..5304c3592 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint import \ - ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint import ( + ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectTemplateTicket from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.tasks = self._register_child_endpoint( - ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint(client, parent_endpoint=self) + ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplateTicket: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplateTicket: """ Performs a GET request against the /project/projectTemplates/{id}/projectTemplateTickets/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTemplateTicket: The parsed response data. """ - return self._parse_one(ProjectTemplateTicket, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectTemplateTicket, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/projectTemplates/{id}/projectTemplateTickets/{id} endpoint. @@ -61,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplateTicket: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplateTicket: """ Performs a PUT request against the /project/projectTemplates/{id}/projectTemplateTickets/{id} endpoint. @@ -73,9 +88,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTemplateTicket: The parsed response data. """ - return self._parse_one(ProjectTemplateTicket, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectTemplateTicket, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplateTicket: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplateTicket: """ Performs a PATCH request against the /project/projectTemplates/{id}/projectTemplateTickets/{id} endpoint. @@ -85,4 +105,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectTemplateTicket: The parsed response data. """ - return self._parse_one(ProjectTemplateTicket, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectTemplateTicket, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint.py index d83182b07..40cb236f3 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint(ConnectWiseEndpoint): +class ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/projectTemplates/{id}/projectTemplateTickets/{id}/tasks/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/projectTemplates/{id}/projectTemplateTickets/{id}/tasks/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint.py index fcd4fadf2..ec27a97e4 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint.py @@ -1,24 +1,32 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint import \ - ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint -from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint import \ - ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint import ( + ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint import ( + ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectTemplateTask from pyconnectwise.responses.paginated_response import PaginatedResponse -class ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint(ConnectWiseEndpoint): +class ProjectProjecttemplatesIdProjecttemplateticketsIdTasksEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tasks", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint(client, parent_endpoint=self) + ProjectProjecttemplatesIdProjecttemplateticketsIdTasksCountEndpoint( + client, parent_endpoint=self + ) ) - def id(self, id: int) -> ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint: + def id( + self, id: int + ) -> ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint: """ Sets the ID for this endpoint and returns an initialized ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint object to move down the chain. @@ -27,7 +35,9 @@ def id(self, id: int) -> ProjectProjecttemplatesIdProjecttemplateticketsIdTasksI Returns: ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint: The initialized ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint object. """ - child = ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint(self.client, parent_endpoint=self) + child = ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +64,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectTemplateTask]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectTemplateTask]: """ Performs a GET request against the /project/projectTemplates/{id}/projectTemplateTickets/{id}/tasks endpoint. @@ -64,9 +76,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectTemplateTask]: The parsed response data. """ - return self._parse_many(ProjectTemplateTask, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectTemplateTask, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplateTask: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplateTask: """ Performs a POST request against the /project/projectTemplates/{id}/projectTemplateTickets/{id}/tasks endpoint. @@ -76,4 +93,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectTemplateTask: The parsed response data. """ - return self._parse_one(ProjectTemplateTask, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectTemplateTask, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint.py index f4a787636..7aa741c0e 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint.py @@ -6,7 +6,9 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint(ConnectWiseEndpoint): +class ProjectProjecttemplatesIdProjecttemplateticketsIdTasksIdEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) @@ -33,7 +35,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplateTask: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplateTask: """ Performs a GET request against the /project/projectTemplates/{id}/projectTemplateTickets/{id}/tasks/{id} endpoint. @@ -43,9 +47,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTemplateTask: The parsed response data. """ - return self._parse_one(ProjectTemplateTask, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectTemplateTask, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/projectTemplates/{id}/projectTemplateTickets/{id}/tasks/{id} endpoint. @@ -55,9 +64,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplateTask: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplateTask: """ Performs a PUT request against the /project/projectTemplates/{id}/projectTemplateTickets/{id}/tasks/{id} endpoint. @@ -67,9 +81,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTemplateTask: The parsed response data. """ - return self._parse_one(ProjectTemplateTask, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectTemplateTask, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTemplateTask: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTemplateTask: """ Performs a PATCH request against the /project/projectTemplates/{id}/projectTemplateTickets/{id}/tasks/{id} endpoint. @@ -79,4 +98,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectTemplateTask: The parsed response data. """ - return self._parse_one(ProjectTemplateTask, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectTemplateTask, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdWorkplanEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdWorkplanEndpoint.py index 6b5fdf262..43dfdba34 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdWorkplanEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectProjecttemplatesIdWorkplanEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectTemplateWorkPlan]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectTemplateWorkPlan]: """ Performs a GET request against the /project/projectTemplates/{id}/workplan endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectTemplateWorkPlan]: The parsed response data. """ - return self._parse_many(ProjectTemplateWorkPlan, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectTemplateWorkPlan, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesCountEndpoint.py index 1d84843d4..2bdc3354d 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectSecurityrolesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/securityRoles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/securityRoles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesEndpoint.py index d73ea12f8..3f914df45 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectSecurityrolesCountEndpoint import ProjectSecurityrolesCountEndpoint -from pyconnectwise.endpoints.manage.ProjectSecurityrolesIdEndpoint import ProjectSecurityrolesIdEndpoint +from pyconnectwise.endpoints.manage.ProjectSecurityrolesCountEndpoint import ( + ProjectSecurityrolesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectSecurityrolesIdEndpoint import ( + ProjectSecurityrolesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectSecurityRole from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProjectSecurityrolesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "securityRoles", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectSecurityrolesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectSecurityrolesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectSecurityrolesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectSecurityRole]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectSecurityRole]: """ Performs a GET request against the /project/securityRoles endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectSecurityRole]: The parsed response data. """ - return self._parse_many(ProjectSecurityRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectSecurityRole, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectSecurityRole: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectSecurityRole: """ Performs a POST request against the /project/securityRoles endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectSecurityRole: The parsed response data. """ - return self._parse_one(ProjectSecurityRole, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectSecurityRole, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdEndpoint.py index b1d2ffa3b..d08502fe9 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectSecurityrolesIdSettingsEndpoint import ProjectSecurityrolesIdSettingsEndpoint +from pyconnectwise.endpoints.manage.ProjectSecurityrolesIdSettingsEndpoint import ( + ProjectSecurityrolesIdSettingsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectSecurityRole from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -38,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectSecurityRole: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectSecurityRole: """ Performs a GET request against the /project/securityRoles/{id} endpoint. @@ -48,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectSecurityRole: The parsed response data. """ - return self._parse_one(ProjectSecurityRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectSecurityRole, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/securityRoles/{id} endpoint. @@ -60,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectSecurityRole: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectSecurityRole: """ Performs a PUT request against the /project/securityRoles/{id} endpoint. @@ -72,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectSecurityRole: The parsed response data. """ - return self._parse_one(ProjectSecurityRole, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectSecurityRole, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectSecurityRole: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectSecurityRole: """ Performs a PATCH request against the /project/securityRoles/{id} endpoint. @@ -84,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectSecurityRole: The parsed response data. """ - return self._parse_one(ProjectSecurityRole, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectSecurityRole, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsCountEndpoint.py index c2aafb695..5055ef562 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectSecurityrolesIdSettingsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/securityRoles/{id}/settings/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/securityRoles/{id}/settings/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsEndpoint.py index 8a449b1af..63f099595 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectSecurityrolesIdSettingsCountEndpoint import \ - ProjectSecurityrolesIdSettingsCountEndpoint -from pyconnectwise.endpoints.manage.ProjectSecurityrolesIdSettingsIdEndpoint import \ - ProjectSecurityrolesIdSettingsIdEndpoint +from pyconnectwise.endpoints.manage.ProjectSecurityrolesIdSettingsCountEndpoint import ( + ProjectSecurityrolesIdSettingsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectSecurityrolesIdSettingsIdEndpoint import ( + ProjectSecurityrolesIdSettingsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectSecurityRoleSetting from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ProjectSecurityrolesIdSettingsIdEndpoint: Returns: ProjectSecurityrolesIdSettingsIdEndpoint: The initialized ProjectSecurityrolesIdSettingsIdEndpoint object. """ - child = ProjectSecurityrolesIdSettingsIdEndpoint(self.client, parent_endpoint=self) + child = ProjectSecurityrolesIdSettingsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectSecurityRoleSetting]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectSecurityRoleSetting]: """ Performs a GET request against the /project/securityRoles/{id}/settings endpoint. @@ -65,5 +71,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ProjectSecurityRoleSetting]: The parsed response data. """ return self._parse_many( - ProjectSecurityRoleSetting, super()._make_request("GET", data=data, params=params).json() + ProjectSecurityRoleSetting, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsIdEndpoint.py index d9bcba7cf..53f08bb36 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectSecurityRolesIdSettingsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectSecurityRoleSetting: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectSecurityRoleSetting: """ Performs a GET request against the /project/securityRoles/{id}/settings/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P ProjectSecurityRoleSetting: The parsed response data. """ return self._parse_one( - ProjectSecurityRoleSetting, super()._make_request("GET", data=data, params=params).json() + ProjectSecurityRoleSetting, + super()._make_request("GET", data=data, params=params).json(), ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectSecurityRoleSetting: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectSecurityRoleSetting: """ Performs a PUT request against the /project/securityRoles/{id}/settings/{id} endpoint. @@ -58,10 +63,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P ProjectSecurityRoleSetting: The parsed response data. """ return self._parse_one( - ProjectSecurityRoleSetting, super()._make_request("PUT", data=data, params=params).json() + ProjectSecurityRoleSetting, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectSecurityRoleSetting: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectSecurityRoleSetting: """ Performs a PATCH request against the /project/securityRoles/{id}/settings/{id} endpoint. @@ -72,5 +80,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectSecurityRoleSetting: The parsed response data. """ return self._parse_one( - ProjectSecurityRoleSetting, super()._make_request("PATCH", data=data, params=params).json() + ProjectSecurityRoleSetting, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsCountEndpoint.py index 8e3e1b98e..65b14d31b 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectStatusindicatorsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/statusIndicators/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/statusIndicators/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsEndpoint.py index e8d6102dd..bcf3dde39 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusindicatorsCountEndpoint import ProjectStatusindicatorsCountEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusindicatorsIdEndpoint import ProjectStatusindicatorsIdEndpoint +from pyconnectwise.endpoints.manage.ProjectStatusindicatorsCountEndpoint import ( + ProjectStatusindicatorsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectStatusindicatorsIdEndpoint import ( + ProjectStatusindicatorsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import StatusIndicator from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProjectStatusindicatorsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "statusIndicators", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectStatusindicatorsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectStatusindicatorsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectStatusindicatorsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[StatusIndicator]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[StatusIndicator]: """ Performs a GET request against the /project/statusIndicators endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[StatusIndicator]: The parsed response data. """ - return self._parse_many(StatusIndicator, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + StatusIndicator, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsIdEndpoint.py index 63cf0416d..62ef96766 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusIndicatorsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> StatusIndicator: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> StatusIndicator: """ Performs a GET request against the /project/statusIndicators/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: StatusIndicator: The parsed response data. """ - return self._parse_one(StatusIndicator, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + StatusIndicator, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusesCountEndpoint.py index f166478f9..f0adc54ad 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectStatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/statuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/statuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusesEndpoint.py index 6b87d9169..2ace0978b 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusesCountEndpoint import ProjectStatusesCountEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusesIdEndpoint import ProjectStatusesIdEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusesInfoEndpoint import ProjectStatusesInfoEndpoint +from pyconnectwise.endpoints.manage.ProjectStatusesCountEndpoint import ( + ProjectStatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectStatusesIdEndpoint import ( + ProjectStatusesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectStatusesInfoEndpoint import ( + ProjectStatusesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProjectStatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "statuses", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProjectStatusesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ProjectStatusesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectStatusesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProjectStatusesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectStatusesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectStatus]: """ Performs a GET request against the /project/statuses endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectStatus]: The parsed response data. """ - return self._parse_many(ProjectStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectStatus, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectStatus: """ Performs a POST request against the /project/statuses endpoint. @@ -74,4 +90,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectStatus: The parsed response data. """ - return self._parse_one(ProjectStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectStatus, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusesIdEndpoint.py index 22397d795..3d23c3c0a 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusesIdInfoEndpoint import ProjectStatusesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusesIdUsagesEndpoint import ProjectStatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ProjectStatusesIdInfoEndpoint import ( + ProjectStatusesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectStatusesIdUsagesEndpoint import ( + ProjectStatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,8 +16,12 @@ class ProjectStatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ProjectStatusesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ProjectStatusesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ProjectStatusesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ProjectStatusesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -38,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectStatus: """ Performs a GET request against the /project/statuses/{id} endpoint. @@ -48,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectStatus: The parsed response data. """ - return self._parse_one(ProjectStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectStatus, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/statuses/{id} endpoint. @@ -60,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectStatus: """ Performs a PUT request against the /project/statuses/{id} endpoint. @@ -72,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectStatus: The parsed response data. """ - return self._parse_one(ProjectStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectStatus, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectStatus: """ Performs a PATCH request against the /project/statuses/{id} endpoint. @@ -84,4 +107,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectStatus: The parsed response data. """ - return self._parse_one(ProjectStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectStatus, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusesIdInfoEndpoint.py index 085266be0..0860210bc 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectStatusInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectStatusInfo: """ Performs a GET request against the /project/statuses/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectStatusInfo: The parsed response data. """ - return self._parse_one(ProjectStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusesIdUsagesEndpoint.py index 7d8e835fa..47af25264 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusesIdUsagesListEndpoint import ProjectStatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ProjectStatusesIdUsagesListEndpoint import ( + ProjectStatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ProjectStatusesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ProjectStatusesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ProjectStatusesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /project/statuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /project/statuses/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusesIdUsagesListEndpoint.py index de9e2ab04..1d7b85d74 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ProjectStatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /project/statuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /project/statuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusesInfoCountEndpoint.py index d3eb26efa..7c12500c0 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectStatusesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/statuses/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/statuses/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectStatusesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectStatusesInfoEndpoint.py index d1b75c031..f2d55a4ef 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectStatusesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectStatusesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectStatusesInfoCountEndpoint import ProjectStatusesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ProjectStatusesInfoCountEndpoint import ( + ProjectStatusesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectStatusInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProjectStatusesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectStatusesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectStatusesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectStatusInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectStatusInfo]: """ Performs a GET request against the /project/statuses/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectStatusInfo]: The parsed response data. """ - return self._parse_many(ProjectStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketnoteEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketnoteEndpoint.py index 3edf03966..d3fc35215 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketnoteEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketnoteEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketnoteIdEndpoint import ProjectTicketnoteIdEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketnoteIdEndpoint import ( + ProjectTicketnoteIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketnoteIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketnoteIdEndpoint.py index 9899c5900..198eea66a 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketnoteIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketnoteIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketnoteIdMarkasEndpoint import ProjectTicketnoteIdMarkasEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketnoteIdMarkasEndpoint import ( + ProjectTicketnoteIdMarkasEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ProjectTicketnoteIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.mark_as = self._register_child_endpoint(ProjectTicketnoteIdMarkasEndpoint(client, parent_endpoint=self)) + self.mark_as = self._register_child_endpoint( + ProjectTicketnoteIdMarkasEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsCountEndpoint.py index 7a68a3e18..10f346cb7 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/tickets/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/tickets/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsEndpoint.py index eefff9013..fc0522054 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsCountEndpoint import ProjectTicketsCountEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdEndpoint import ProjectTicketsIdEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsSearchEndpoint import ProjectTicketsSearchEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsCountEndpoint import ( + ProjectTicketsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdEndpoint import ( + ProjectTicketsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsSearchEndpoint import ( + ProjectTicketsSearchEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectTicket from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ProjectTicketsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tickets", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectTicketsCountEndpoint(client, parent_endpoint=self)) - self.search = self._register_child_endpoint(ProjectTicketsSearchEndpoint(client, parent_endpoint=self)) + self.search = self._register_child_endpoint( + ProjectTicketsSearchEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + ProjectTicketsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectTicketsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectTicket]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectTicket]: """ Performs a GET request against the /project/tickets endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectTicket]: The parsed response data. """ - return self._parse_many(ProjectTicket, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectTicket, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTicket: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTicket: """ Performs a POST request against the /project/tickets endpoint. @@ -74,4 +90,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectTicket: The parsed response data. """ - return self._parse_one(ProjectTicket, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ProjectTicket, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdActivitiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdActivitiesCountEndpoint.py index e9061cfa7..d1b7b5ead 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdActivitiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdActivitiesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdActivitiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/tickets/{id}/activities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/tickets/{id}/activities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdActivitiesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdActivitiesEndpoint.py index 67c41e4a6..d12dff035 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdActivitiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdActivitiesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdActivitiesCountEndpoint import \ - ProjectTicketsIdActivitiesCountEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsIdActivitiesCountEndpoint import ( + ProjectTicketsIdActivitiesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ActivityReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ActivityReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ActivityReference]: """ Performs a GET request against the /project/tickets/{id}/activities endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ActivityReference]: The parsed response data. """ - return self._parse_many(ActivityReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ActivityReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdAllNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdAllNotesEndpoint.py index 89e21d48e..fee8e3086 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdAllNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdAllNotesEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectTicketNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectTicketNote]: """ Performs a GET request against the /project/tickets/{id}/allNotes endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProjectTicketNote]: The parsed response data. """ - return self._parse_many(ProjectTicketNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProjectTicketNote, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsCountEndpoint.py index 893f07aa9..b3ca770f6 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdConfigurationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/tickets/{id}/configurations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/tickets/{id}/configurations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsEndpoint.py index 89147e0ec..c6bdea269 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdConfigurationsCountEndpoint import \ - ProjectTicketsIdConfigurationsCountEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdConfigurationsIdEndpoint import \ - ProjectTicketsIdConfigurationsIdEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsIdConfigurationsCountEndpoint import ( + ProjectTicketsIdConfigurationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdConfigurationsIdEndpoint import ( + ProjectTicketsIdConfigurationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ProjectTicketsIdConfigurationsIdEndpoint: Returns: ProjectTicketsIdConfigurationsIdEndpoint: The initialized ProjectTicketsIdConfigurationsIdEndpoint object. """ - child = ProjectTicketsIdConfigurationsIdEndpoint(self.client, parent_endpoint=self) + child = ProjectTicketsIdConfigurationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationReference]: """ Performs a GET request against the /project/tickets/{id}/configurations endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ConfigurationReference]: The parsed response data. """ - return self._parse_many(ConfigurationReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ConfigurationReference, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationReference: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationReference: """ Performs a POST request against the /project/tickets/{id}/configurations endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConfigurationReference: The parsed response data. """ - return self._parse_one(ConfigurationReference, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ConfigurationReference, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsIdEndpoint.py index 7a4de7b4e..0ce80f249 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConfigurationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationReference: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationReference: """ Performs a GET request against the /project/tickets/{id}/configurations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationReference: The parsed response data. """ - return self._parse_one(ConfigurationReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConfigurationReference, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/tickets/{id}/configurations/{id} endpoint. @@ -55,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConvertEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConvertEndpoint.py index ba438f11c..2516bbc90 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConvertEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdConvertEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdConvertEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "convert", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /project/tickets/{id}/convert endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdDocumentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdDocumentsCountEndpoint.py index 1c48f8eb0..a6633d868 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdDocumentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdDocumentsCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdDocumentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/tickets/{id}/documents/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/tickets/{id}/documents/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdDocumentsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdDocumentsEndpoint.py index 90ee09f62..c5746d425 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdDocumentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdDocumentsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdDocumentsCountEndpoint import ProjectTicketsIdDocumentsCountEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsIdDocumentsCountEndpoint import ( + ProjectTicketsIdDocumentsCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DocumentReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProjectTicketsIdDocumentsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "documents", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectTicketsIdDocumentsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectTicketsIdDocumentsCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DocumentReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DocumentReference]: """ Performs a GET request against the /project/tickets/{id}/documents endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DocumentReference]: The parsed response data. """ - return self._parse_many(DocumentReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DocumentReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdEndpoint.py index 5cbf843ca..f7029e38d 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdEndpoint.py @@ -1,17 +1,36 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdActivitiesEndpoint import ProjectTicketsIdActivitiesEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdAllnotesEndpoint import ProjectTicketsIdAllnotesEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdConfigurationsEndpoint import ProjectTicketsIdConfigurationsEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdConvertEndpoint import ProjectTicketsIdConvertEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdDocumentsEndpoint import ProjectTicketsIdDocumentsEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdNotesEndpoint import ProjectTicketsIdNotesEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdProductsEndpoint import ProjectTicketsIdProductsEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdScheduleentriesEndpoint import \ - ProjectTicketsIdScheduleentriesEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdTasksEndpoint import ProjectTicketsIdTasksEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdTimeentriesEndpoint import ProjectTicketsIdTimeentriesEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsIdActivitiesEndpoint import ( + ProjectTicketsIdActivitiesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdAllnotesEndpoint import ( + ProjectTicketsIdAllnotesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdConfigurationsEndpoint import ( + ProjectTicketsIdConfigurationsEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdConvertEndpoint import ( + ProjectTicketsIdConvertEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdDocumentsEndpoint import ( + ProjectTicketsIdDocumentsEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdNotesEndpoint import ( + ProjectTicketsIdNotesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdProductsEndpoint import ( + ProjectTicketsIdProductsEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdScheduleentriesEndpoint import ( + ProjectTicketsIdScheduleentriesEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdTasksEndpoint import ( + ProjectTicketsIdTasksEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdTimeentriesEndpoint import ( + ProjectTicketsIdTimeentriesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProjectTicket from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,23 +40,35 @@ class ProjectTicketsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.convert = self._register_child_endpoint(ProjectTicketsIdConvertEndpoint(client, parent_endpoint=self)) - self.products = self._register_child_endpoint(ProjectTicketsIdProductsEndpoint(client, parent_endpoint=self)) - self.all_notes = self._register_child_endpoint(ProjectTicketsIdAllnotesEndpoint(client, parent_endpoint=self)) + self.notes = self._register_child_endpoint( + ProjectTicketsIdNotesEndpoint(client, parent_endpoint=self) + ) + self.all_notes = self._register_child_endpoint( + ProjectTicketsIdAllnotesEndpoint(client, parent_endpoint=self) + ) self.configurations = self._register_child_endpoint( ProjectTicketsIdConfigurationsEndpoint(client, parent_endpoint=self) ) - self.notes = self._register_child_endpoint(ProjectTicketsIdNotesEndpoint(client, parent_endpoint=self)) + self.timeentries = self._register_child_endpoint( + ProjectTicketsIdTimeentriesEndpoint(client, parent_endpoint=self) + ) + self.tasks = self._register_child_endpoint( + ProjectTicketsIdTasksEndpoint(client, parent_endpoint=self) + ) self.activities = self._register_child_endpoint( ProjectTicketsIdActivitiesEndpoint(client, parent_endpoint=self) ) + self.documents = self._register_child_endpoint( + ProjectTicketsIdDocumentsEndpoint(client, parent_endpoint=self) + ) self.scheduleentries = self._register_child_endpoint( ProjectTicketsIdScheduleentriesEndpoint(client, parent_endpoint=self) ) - self.tasks = self._register_child_endpoint(ProjectTicketsIdTasksEndpoint(client, parent_endpoint=self)) - self.documents = self._register_child_endpoint(ProjectTicketsIdDocumentsEndpoint(client, parent_endpoint=self)) - self.timeentries = self._register_child_endpoint( - ProjectTicketsIdTimeentriesEndpoint(client, parent_endpoint=self) + self.products = self._register_child_endpoint( + ProjectTicketsIdProductsEndpoint(client, parent_endpoint=self) + ) + self.convert = self._register_child_endpoint( + ProjectTicketsIdConvertEndpoint(client, parent_endpoint=self) ) def paginated( @@ -63,7 +94,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTicket: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTicket: """ Performs a GET request against the /project/tickets/{id} endpoint. @@ -73,9 +106,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTicket: The parsed response data. """ - return self._parse_one(ProjectTicket, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ProjectTicket, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/tickets/{id} endpoint. @@ -85,9 +122,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTicket: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTicket: """ Performs a PUT request against the /project/tickets/{id} endpoint. @@ -97,9 +139,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ProjectTicket: The parsed response data. """ - return self._parse_one(ProjectTicket, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ProjectTicket, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ProjectTicket: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ProjectTicket: """ Performs a PATCH request against the /project/tickets/{id} endpoint. @@ -109,4 +155,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ProjectTicket: The parsed response data. """ - return self._parse_one(ProjectTicket, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ProjectTicket, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesCountEndpoint.py index 4bfc1e4d1..80fe8ea43 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdNotesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/tickets/{id}/notes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/tickets/{id}/notes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesEndpoint.py index 59dedc272..1b002e842 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdNotesCountEndpoint import ProjectTicketsIdNotesCountEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdNotesIdEndpoint import ProjectTicketsIdNotesIdEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsIdNotesCountEndpoint import ( + ProjectTicketsIdNotesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdNotesIdEndpoint import ( + ProjectTicketsIdNotesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TicketNote from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProjectTicketsIdNotesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "notes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectTicketsIdNotesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectTicketsIdNotesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectTicketsIdNotesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ProjectTicketsIdNotesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TicketNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TicketNote]: """ Performs a GET request against the /project/tickets/{id}/notes endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TicketNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TicketNote]: """ Performs a GET request against the /project/tickets/{id}/notes endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TicketNote]: The parsed response data. """ - return self._parse_many(TicketNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TicketNote, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketNote: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketNote: """ Performs a POST request against the /project/tickets/{id}/notes endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TicketNote: The parsed response data. """ - return self._parse_one(TicketNote, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TicketNote, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesIdEndpoint.py index b51b83c6f..7102fe131 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdNotesIdEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdNotesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TicketNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TicketNote]: """ Performs a GET request against the /project/tickets/{id}/notes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketNote: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketNote: """ Performs a GET request against the /project/tickets/{id}/notes/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TicketNote: The parsed response data. """ - return self._parse_one(TicketNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TicketNote, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/tickets/{id}/notes/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketNote: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketNote: """ Performs a PUT request against the /project/tickets/{id}/notes/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TicketNote: The parsed response data. """ - return self._parse_one(TicketNote, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TicketNote, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketNote: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketNote: """ Performs a PATCH request against the /project/tickets/{id}/notes/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TicketNote: The parsed response data. """ - return self._parse_one(TicketNote, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TicketNote, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdProductsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdProductsCountEndpoint.py index 76c0e2c47..064bf5350 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdProductsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdProductsCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdProductsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/tickets/{id}/products/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/tickets/{id}/products/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdProductsEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdProductsEndpoint.py index 04f9d064a..7b1821c69 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdProductsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdProductsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdProductsCountEndpoint import ProjectTicketsIdProductsCountEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsIdProductsCountEndpoint import ( + ProjectTicketsIdProductsCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ProjectTicketsIdProductsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "products", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectTicketsIdProductsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectTicketsIdProductsCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductReference]: """ Performs a GET request against the /project/tickets/{id}/products endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductReference]: The parsed response data. """ - return self._parse_many(ProductReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProductReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdScheduleentriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdScheduleentriesCountEndpoint.py index 532b5f14b..cbf7faa58 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdScheduleentriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdScheduleentriesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdScheduleentriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/tickets/{id}/scheduleentries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/tickets/{id}/scheduleentries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdScheduleentriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdScheduleentriesEndpoint.py index 2764791e9..407822fde 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdScheduleentriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdScheduleentriesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdScheduleentriesCountEndpoint import \ - ProjectTicketsIdScheduleentriesCountEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsIdScheduleentriesCountEndpoint import ( + ProjectTicketsIdScheduleentriesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleEntryReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleEntryReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleEntryReference]: """ Performs a GET request against the /project/tickets/{id}/scheduleentries endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleEntryReference]: The parsed response data. """ - return self._parse_many(ScheduleEntryReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleEntryReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksCountEndpoint.py index ccf1fffaf..6cc4c728f 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdTasksCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/tickets/{id}/tasks/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/tickets/{id}/tasks/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksEndpoint.py index b005bd8e9..47b5f6b0b 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdTasksCountEndpoint import ProjectTicketsIdTasksCountEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdTasksIdEndpoint import ProjectTicketsIdTasksIdEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsIdTasksCountEndpoint import ( + ProjectTicketsIdTasksCountEndpoint, +) +from pyconnectwise.endpoints.manage.ProjectTicketsIdTasksIdEndpoint import ( + ProjectTicketsIdTasksIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TicketTask from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ProjectTicketsIdTasksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tasks", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ProjectTicketsIdTasksCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ProjectTicketsIdTasksCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ProjectTicketsIdTasksIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ProjectTicketsIdTasksIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TicketTask]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TicketTask]: """ Performs a GET request against the /project/tickets/{id}/tasks endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TicketTask]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TicketTask]: """ Performs a GET request against the /project/tickets/{id}/tasks endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TicketTask]: The parsed response data. """ - return self._parse_many(TicketTask, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TicketTask, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketTask: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketTask: """ Performs a POST request against the /project/tickets/{id}/tasks endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TicketTask: The parsed response data. """ - return self._parse_one(TicketTask, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TicketTask, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksIdEndpoint.py index c374c3c66..8a5f46669 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTasksIdEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdTasksIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TicketTask]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TicketTask]: """ Performs a GET request against the /project/tickets/{id}/tasks/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketTask: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketTask: """ Performs a GET request against the /project/tickets/{id}/tasks/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TicketTask: The parsed response data. """ - return self._parse_one(TicketTask, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TicketTask, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /project/tickets/{id}/tasks/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketTask: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketTask: """ Performs a PUT request against the /project/tickets/{id}/tasks/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TicketTask: The parsed response data. """ - return self._parse_one(TicketTask, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TicketTask, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketTask: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketTask: """ Performs a PATCH request against the /project/tickets/{id}/tasks/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TicketTask: The parsed response data. """ - return self._parse_one(TicketTask, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TicketTask, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTimeentriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTimeentriesCountEndpoint.py index 63f718b1c..7bc8ec30f 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTimeentriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTimeentriesCountEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsIdTimeentriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /project/tickets/{id}/timeentries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /project/tickets/{id}/timeentries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTimeentriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTimeentriesEndpoint.py index 398d127b1..b51e163b2 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTimeentriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsIdTimeentriesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ProjectTicketsIdTimeentriesCountEndpoint import \ - ProjectTicketsIdTimeentriesCountEndpoint +from pyconnectwise.endpoints.manage.ProjectTicketsIdTimeentriesCountEndpoint import ( + ProjectTicketsIdTimeentriesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeEntryReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeEntryReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeEntryReference]: """ Performs a GET request against the /project/tickets/{id}/timeentries endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeEntryReference]: The parsed response data. """ - return self._parse_many(TimeEntryReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeEntryReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ProjectTicketsSearchEndpoint.py b/src/pyconnectwise/endpoints/manage/ProjectTicketsSearchEndpoint.py index 802aa5093..129980ecb 100644 --- a/src/pyconnectwise/endpoints/manage/ProjectTicketsSearchEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ProjectTicketsSearchEndpoint.py @@ -10,7 +10,9 @@ class ProjectTicketsSearchEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "search", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProjectTicket]: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProjectTicket]: """ Performs a POST request against the /project/tickets/search endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: list[ProjectTicket]: The parsed response data. """ - return self._parse_many(ProjectTicket, super()._make_request("POST", data=data, params=params).json()) + return self._parse_many( + ProjectTicket, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesCountEndpoint.py index cc29e33b5..76736b418 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesActivitiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/activities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/activities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesEndpoint.py index fd4517e04..6a96b1164 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesEndpoint.py @@ -1,10 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesCountEndpoint import SalesActivitiesCountEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesIdEndpoint import SalesActivitiesIdEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesStatusesEndpoint import SalesActivitiesStatusesEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesTypesEndpoint import SalesActivitiesTypesEndpoint +from pyconnectwise.endpoints.manage.SalesActivitiesCountEndpoint import ( + SalesActivitiesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesActivitiesIdEndpoint import ( + SalesActivitiesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SalesActivitiesStatusesEndpoint import ( + SalesActivitiesStatusesEndpoint, +) +from pyconnectwise.endpoints.manage.SalesActivitiesTypesEndpoint import ( + SalesActivitiesTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Activity from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,9 +22,15 @@ class SalesActivitiesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "activities", parent_endpoint=parent_endpoint) - self.types = self._register_child_endpoint(SalesActivitiesTypesEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SalesActivitiesCountEndpoint(client, parent_endpoint=self)) - self.statuses = self._register_child_endpoint(SalesActivitiesStatusesEndpoint(client, parent_endpoint=self)) + self.types = self._register_child_endpoint( + SalesActivitiesTypesEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + SalesActivitiesCountEndpoint(client, parent_endpoint=self) + ) + self.statuses = self._register_child_endpoint( + SalesActivitiesStatusesEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesActivitiesIdEndpoint: """ @@ -31,7 +45,9 @@ def id(self, id: int) -> SalesActivitiesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Activity]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Activity]: """ Performs a GET request against the /sales/activities endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +68,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Activity]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Activity]: """ Performs a GET request against the /sales/activities endpoint. @@ -62,9 +80,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Activity]: The parsed response data. """ - return self._parse_many(Activity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Activity, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Activity: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Activity: """ Performs a POST request against the /sales/activities endpoint. @@ -74,4 +96,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Activity: The parsed response data. """ - return self._parse_one(Activity, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Activity, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesIdEndpoint.py index 292863c66..886a47e1e 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesIdEndpoint.py @@ -10,7 +10,9 @@ class SalesActivitiesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Activity]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Activity]: """ Performs a GET request against the /sales/activities/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Activity: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Activity: """ Performs a GET request against the /sales/activities/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: Activity: The parsed response data. """ - return self._parse_one(Activity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Activity, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/activities/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Activity: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Activity: """ Performs a PUT request against the /sales/activities/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: Activity: The parsed response data. """ - return self._parse_one(Activity, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Activity, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Activity: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Activity: """ Performs a PATCH request against the /sales/activities/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Activity: The parsed response data. """ - return self._parse_one(Activity, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Activity, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesCountEndpoint.py index f7fbda917..077a4c02a 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesActivitiesStatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/activities/statuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/activities/statuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesEndpoint.py index 540e8720c..4a6e44de3 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesStatusesCountEndpoint import SalesActivitiesStatusesCountEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesStatusesIdEndpoint import SalesActivitiesStatusesIdEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesStatusesInfoEndpoint import SalesActivitiesStatusesInfoEndpoint +from pyconnectwise.endpoints.manage.SalesActivitiesStatusesCountEndpoint import ( + SalesActivitiesStatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesActivitiesStatusesIdEndpoint import ( + SalesActivitiesStatusesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SalesActivitiesStatusesInfoEndpoint import ( + SalesActivitiesStatusesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ActivityStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SalesActivitiesStatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "statuses", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesActivitiesStatusesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SalesActivitiesStatusesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesActivitiesStatusesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SalesActivitiesStatusesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesActivitiesStatusesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ActivityStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ActivityStatus]: """ Performs a GET request against the /sales/activities/statuses endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ActivityStatus]: The parsed response data. """ - return self._parse_many(ActivityStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ActivityStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityStatus: """ Performs a POST request against the /sales/activities/statuses endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ActivityStatus: The parsed response data. """ - return self._parse_one(ActivityStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ActivityStatus, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesIdEndpoint.py index 0a2fb5c4b..243f7d8c7 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesStatusesIdInfoEndpoint import SalesActivitiesStatusesIdInfoEndpoint +from pyconnectwise.endpoints.manage.SalesActivitiesStatusesIdInfoEndpoint import ( + SalesActivitiesStatusesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ActivityStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SalesActivitiesStatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesActivitiesStatusesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SalesActivitiesStatusesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityStatus: """ Performs a GET request against the /sales/activities/statuses/{id} endpoint. @@ -46,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ActivityStatus: The parsed response data. """ - return self._parse_one(ActivityStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ActivityStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/activities/statuses/{id} endpoint. @@ -58,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityStatus: """ Performs a PUT request against the /sales/activities/statuses/{id} endpoint. @@ -70,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ActivityStatus: The parsed response data. """ - return self._parse_one(ActivityStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ActivityStatus, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityStatus: """ Performs a PATCH request against the /sales/activities/statuses/{id} endpoint. @@ -82,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ActivityStatus: The parsed response data. """ - return self._parse_one(ActivityStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ActivityStatus, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesIdInfoEndpoint.py index 399a37fa2..32e2aad2a 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityStatusInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityStatusInfo: """ Performs a GET request against the /sales/activities/statuses/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ActivityStatusInfo: The parsed response data. """ - return self._parse_one(ActivityStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ActivityStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesInfoCountEndpoint.py index 3b829d2e5..ba3b44c96 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesActivitiesStatusesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/activities/statuses/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/activities/statuses/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesInfoEndpoint.py index 64f296389..f5dc0d6d3 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesStatusesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesStatusesInfoCountEndpoint import \ - SalesActivitiesStatusesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesActivitiesStatusesInfoCountEndpoint import ( + SalesActivitiesStatusesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ActivityStatusInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ActivityStatusInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ActivityStatusInfo]: """ Performs a GET request against the /sales/activities/statuses/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ActivityStatusInfo]: The parsed response data. """ - return self._parse_many(ActivityStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ActivityStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesCountEndpoint.py index 7f0efb3c4..7c5e8324c 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesActivitiesTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/activities/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/activities/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesEndpoint.py index df926d7ac..d89ff7283 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesTypesCountEndpoint import SalesActivitiesTypesCountEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesTypesIdEndpoint import SalesActivitiesTypesIdEndpoint +from pyconnectwise.endpoints.manage.SalesActivitiesTypesCountEndpoint import ( + SalesActivitiesTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesActivitiesTypesIdEndpoint import ( + SalesActivitiesTypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ActivityType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SalesActivitiesTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesActivitiesTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesActivitiesTypesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesActivitiesTypesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ActivityType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ActivityType]: """ Performs a GET request against the /sales/activities/types endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ActivityType]: The parsed response data. """ - return self._parse_many(ActivityType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ActivityType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityType: """ Performs a POST request against the /sales/activities/types endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ActivityType: The parsed response data. """ - return self._parse_one(ActivityType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ActivityType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdEndpoint.py index e63fd33e0..df7716517 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesTypesIdUsagesEndpoint import SalesActivitiesTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.SalesActivitiesTypesIdUsagesEndpoint import ( + SalesActivitiesTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ActivityType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SalesActivitiesTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.usages = self._register_child_endpoint(SalesActivitiesTypesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + SalesActivitiesTypesIdUsagesEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityType: """ Performs a GET request against the /sales/activities/types/{id} endpoint. @@ -46,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ActivityType: The parsed response data. """ - return self._parse_one(ActivityType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ActivityType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/activities/types/{id} endpoint. @@ -58,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityType: """ Performs a PUT request against the /sales/activities/types/{id} endpoint. @@ -70,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ActivityType: The parsed response data. """ - return self._parse_one(ActivityType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ActivityType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityType: """ Performs a PATCH request against the /sales/activities/types/{id} endpoint. @@ -82,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ActivityType: The parsed response data. """ - return self._parse_one(ActivityType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ActivityType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdUsagesEndpoint.py index c743dc950..993380dc5 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesTypesIdUsagesListEndpoint import \ - SalesActivitiesTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SalesActivitiesTypesIdUsagesListEndpoint import ( + SalesActivitiesTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): SalesActivitiesTypesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/activities/types/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/activities/types/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdUsagesListEndpoint.py index feb94a4ab..290c29618 100644 --- a/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesActivitiesTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SalesActivitiesTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/activities/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/activities/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesCommissionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesCommissionsCountEndpoint.py index 310f61fca..58bfdc313 100644 --- a/src/pyconnectwise/endpoints/manage/SalesCommissionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesCommissionsCountEndpoint.py @@ -10,7 +10,9 @@ class SalesCommissionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/commissions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/commissions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesCommissionsEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesCommissionsEndpoint.py index b03a8cf0b..d17b9f656 100644 --- a/src/pyconnectwise/endpoints/manage/SalesCommissionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesCommissionsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesCommissionsCountEndpoint import SalesCommissionsCountEndpoint -from pyconnectwise.endpoints.manage.SalesCommissionsIdEndpoint import SalesCommissionsIdEndpoint +from pyconnectwise.endpoints.manage.SalesCommissionsCountEndpoint import ( + SalesCommissionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesCommissionsIdEndpoint import ( + SalesCommissionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Commission from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SalesCommissionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "commissions", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesCommissionsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesCommissionsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesCommissionsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SalesCommissionsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Commission]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Commission]: """ Performs a GET request against the /sales/commissions endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Commission]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Commission]: """ Performs a GET request against the /sales/commissions endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Commission]: The parsed response data. """ - return self._parse_many(Commission, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Commission, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Commission: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Commission: """ Performs a POST request against the /sales/commissions endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Commission: The parsed response data. """ - return self._parse_one(Commission, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Commission, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesCommissionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesCommissionsIdEndpoint.py index 3398938a8..0affbce0c 100644 --- a/src/pyconnectwise/endpoints/manage/SalesCommissionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesCommissionsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesCommissionsIdUsagesEndpoint import SalesCommissionsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.SalesCommissionsIdUsagesEndpoint import ( + SalesCommissionsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Commission from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SalesCommissionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.usages = self._register_child_endpoint(SalesCommissionsIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + SalesCommissionsIdUsagesEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Commission]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Commission]: """ Performs a GET request against the /sales/commissions/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Commission: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Commission: """ Performs a GET request against the /sales/commissions/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Commission: The parsed response data. """ - return self._parse_one(Commission, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Commission, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/commissions/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Commission: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Commission: """ Performs a PUT request against the /sales/commissions/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Commission: The parsed response data. """ - return self._parse_one(Commission, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Commission, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Commission: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Commission: """ Performs a PATCH request against the /sales/commissions/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Commission: The parsed response data. """ - return self._parse_one(Commission, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Commission, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesCommissionsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesCommissionsIdUsagesEndpoint.py index b9225f510..60616c4a4 100644 --- a/src/pyconnectwise/endpoints/manage/SalesCommissionsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesCommissionsIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesCommissionsIdUsagesListEndpoint import SalesCommissionsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SalesCommissionsIdUsagesListEndpoint import ( + SalesCommissionsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SalesCommissionsIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(SalesCommissionsIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + SalesCommissionsIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/commissions/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/commissions/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesCommissionsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesCommissionsIdUsagesListEndpoint.py index 26b4ecf2e..65a2cdfeb 100644 --- a/src/pyconnectwise/endpoints/manage/SalesCommissionsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesCommissionsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SalesCommissionsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/commissions/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/commissions/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesEndpoint.py index 36a7c19b8..7558df423 100644 --- a/src/pyconnectwise/endpoints/manage/SalesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesEndpoint.py @@ -1,14 +1,24 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesActivitiesEndpoint import SalesActivitiesEndpoint -from pyconnectwise.endpoints.manage.SalesCommissionsEndpoint import SalesCommissionsEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesEndpoint import SalesOpportunitiesEndpoint +from pyconnectwise.endpoints.manage.SalesActivitiesEndpoint import ( + SalesActivitiesEndpoint, +) +from pyconnectwise.endpoints.manage.SalesCommissionsEndpoint import ( + SalesCommissionsEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesEndpoint import ( + SalesOpportunitiesEndpoint, +) from pyconnectwise.endpoints.manage.SalesOrdersEndpoint import SalesOrdersEndpoint -from pyconnectwise.endpoints.manage.SalesProbabilitiesEndpoint import SalesProbabilitiesEndpoint +from pyconnectwise.endpoints.manage.SalesProbabilitiesEndpoint import ( + SalesProbabilitiesEndpoint, +) from pyconnectwise.endpoints.manage.SalesQuotasEndpoint import SalesQuotasEndpoint from pyconnectwise.endpoints.manage.SalesRolesEndpoint import SalesRolesEndpoint -from pyconnectwise.endpoints.manage.SalesSalesteamsEndpoint import SalesSalesteamsEndpoint +from pyconnectwise.endpoints.manage.SalesSalesteamsEndpoint import ( + SalesSalesteamsEndpoint, +) from pyconnectwise.endpoints.manage.SalesScheduleEndpoint import SalesScheduleEndpoint from pyconnectwise.endpoints.manage.SalesServiceEndpoint import SalesServiceEndpoint from pyconnectwise.endpoints.manage.SalesStagesEndpoint import SalesStagesEndpoint @@ -20,14 +30,36 @@ class SalesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "sales", parent_endpoint=parent_endpoint) - self.opportunities = self._register_child_endpoint(SalesOpportunitiesEndpoint(client, parent_endpoint=self)) - self.quotas = self._register_child_endpoint(SalesQuotasEndpoint(client, parent_endpoint=self)) - self.probabilities = self._register_child_endpoint(SalesProbabilitiesEndpoint(client, parent_endpoint=self)) - self.sales_teams = self._register_child_endpoint(SalesSalesteamsEndpoint(client, parent_endpoint=self)) - self.schedule = self._register_child_endpoint(SalesScheduleEndpoint(client, parent_endpoint=self)) - self.activities = self._register_child_endpoint(SalesActivitiesEndpoint(client, parent_endpoint=self)) - self.roles = self._register_child_endpoint(SalesRolesEndpoint(client, parent_endpoint=self)) - self.stages = self._register_child_endpoint(SalesStagesEndpoint(client, parent_endpoint=self)) - self.orders = self._register_child_endpoint(SalesOrdersEndpoint(client, parent_endpoint=self)) - self.service = self._register_child_endpoint(SalesServiceEndpoint(client, parent_endpoint=self)) - self.commissions = self._register_child_endpoint(SalesCommissionsEndpoint(client, parent_endpoint=self)) + self.quotas = self._register_child_endpoint( + SalesQuotasEndpoint(client, parent_endpoint=self) + ) + self.commissions = self._register_child_endpoint( + SalesCommissionsEndpoint(client, parent_endpoint=self) + ) + self.opportunities = self._register_child_endpoint( + SalesOpportunitiesEndpoint(client, parent_endpoint=self) + ) + self.service = self._register_child_endpoint( + SalesServiceEndpoint(client, parent_endpoint=self) + ) + self.stages = self._register_child_endpoint( + SalesStagesEndpoint(client, parent_endpoint=self) + ) + self.schedule = self._register_child_endpoint( + SalesScheduleEndpoint(client, parent_endpoint=self) + ) + self.activities = self._register_child_endpoint( + SalesActivitiesEndpoint(client, parent_endpoint=self) + ) + self.probabilities = self._register_child_endpoint( + SalesProbabilitiesEndpoint(client, parent_endpoint=self) + ) + self.roles = self._register_child_endpoint( + SalesRolesEndpoint(client, parent_endpoint=self) + ) + self.sales_teams = self._register_child_endpoint( + SalesSalesteamsEndpoint(client, parent_endpoint=self) + ) + self.orders = self._register_child_endpoint( + SalesOrdersEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesCountEndpoint.py index f248daefd..cc3bec490 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesDefaultEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesDefaultEndpoint.py index ec85c0cd8..77651b391 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesDefaultEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesDefaultEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesDefaultEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "default", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Opportunity]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Opportunity]: """ Performs a GET request against the /sales/opportunities/default endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Opportunity: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Opportunity: """ Performs a GET request against the /sales/opportunities/default endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: Opportunity: The parsed response data. """ - return self._parse_one(Opportunity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Opportunity, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesEndpoint.py index b0fa6fe7f..30aa8626c 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesEndpoint.py @@ -1,12 +1,24 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesCountEndpoint import SalesOpportunitiesCountEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesDefaultEndpoint import SalesOpportunitiesDefaultEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdEndpoint import SalesOpportunitiesIdEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsEndpoint import SalesOpportunitiesRatingsEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesEndpoint import SalesOpportunitiesStatusesEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesEndpoint import SalesOpportunitiesTypesEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesCountEndpoint import ( + SalesOpportunitiesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesDefaultEndpoint import ( + SalesOpportunitiesDefaultEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdEndpoint import ( + SalesOpportunitiesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsEndpoint import ( + SalesOpportunitiesRatingsEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesEndpoint import ( + SalesOpportunitiesStatusesEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesEndpoint import ( + SalesOpportunitiesTypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Opportunity from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,11 +28,21 @@ class SalesOpportunitiesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "opportunities", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesOpportunitiesCountEndpoint(client, parent_endpoint=self)) - self.ratings = self._register_child_endpoint(SalesOpportunitiesRatingsEndpoint(client, parent_endpoint=self)) - self.default = self._register_child_endpoint(SalesOpportunitiesDefaultEndpoint(client, parent_endpoint=self)) - self.types = self._register_child_endpoint(SalesOpportunitiesTypesEndpoint(client, parent_endpoint=self)) - self.statuses = self._register_child_endpoint(SalesOpportunitiesStatusesEndpoint(client, parent_endpoint=self)) + self.default = self._register_child_endpoint( + SalesOpportunitiesDefaultEndpoint(client, parent_endpoint=self) + ) + self.types = self._register_child_endpoint( + SalesOpportunitiesTypesEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + SalesOpportunitiesCountEndpoint(client, parent_endpoint=self) + ) + self.statuses = self._register_child_endpoint( + SalesOpportunitiesStatusesEndpoint(client, parent_endpoint=self) + ) + self.ratings = self._register_child_endpoint( + SalesOpportunitiesRatingsEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesOpportunitiesIdEndpoint: """ @@ -35,7 +57,9 @@ def id(self, id: int) -> SalesOpportunitiesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Opportunity]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Opportunity]: """ Performs a GET request against the /sales/opportunities endpoint and returns an initialized PaginatedResponse object. @@ -56,7 +80,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Opportunity]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Opportunity]: """ Performs a GET request against the /sales/opportunities endpoint. @@ -66,9 +92,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Opportunity]: The parsed response data. """ - return self._parse_many(Opportunity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Opportunity, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Opportunity: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Opportunity: """ Performs a POST request against the /sales/opportunities endpoint. @@ -78,4 +108,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Opportunity: The parsed response data. """ - return self._parse_one(Opportunity, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Opportunity, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsCountEndpoint.py index ab6b761d2..bb306b039 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesIdContactsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/{id}/contacts/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/{id}/contacts/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsEndpoint.py index 0636c8bd1..69ee9674b 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdContactsCountEndpoint import \ - SalesOpportunitiesIdContactsCountEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdContactsIdEndpoint import SalesOpportunitiesIdContactsIdEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdContactsCountEndpoint import ( + SalesOpportunitiesIdContactsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdContactsIdEndpoint import ( + SalesOpportunitiesIdContactsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityContact from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> SalesOpportunitiesIdContactsIdEndpoint: Returns: SalesOpportunitiesIdContactsIdEndpoint: The initialized SalesOpportunitiesIdContactsIdEndpoint object. """ - child = SalesOpportunitiesIdContactsIdEndpoint(self.client, parent_endpoint=self) + child = SalesOpportunitiesIdContactsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityContact]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityContact]: """ Performs a GET request against the /sales/opportunities/{id}/contacts endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityContact]: The parsed response data. """ - return self._parse_many(OpportunityContact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityContact, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityContact: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityContact: """ Performs a POST request against the /sales/opportunities/{id}/contacts endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityContact: The parsed response data. """ - return self._parse_one(OpportunityContact, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + OpportunityContact, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsIdEndpoint.py index e924e26e3..578f684f6 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdContactsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityContact: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityContact: """ Performs a GET request against the /sales/opportunities/{id}/contacts/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityContact: The parsed response data. """ - return self._parse_one(OpportunityContact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityContact, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/opportunities/{id}/contacts/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityContact: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityContact: """ Performs a PUT request against the /sales/opportunities/{id}/contacts/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityContact: The parsed response data. """ - return self._parse_one(OpportunityContact, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OpportunityContact, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityContact: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityContact: """ Performs a PATCH request against the /sales/opportunities/{id}/contacts/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityContact: The parsed response data. """ - return self._parse_one(OpportunityContact, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OpportunityContact, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToAgreementEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToAgreementEndpoint.py index c12636076..c450ac11b 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToAgreementEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToAgreementEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesIdConverttoagreementEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "convertToAgreement", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Agreement: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Agreement: """ Performs a POST request against the /sales/opportunities/{id}/convertToAgreement endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Agreement: The parsed response data. """ - return self._parse_one(Agreement, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Agreement, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToProjectEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToProjectEndpoint.py index 17eb5734a..50dc7b509 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToProjectEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToProjectEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesIdConverttoprojectEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "convertToProject", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Project: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Project: """ Performs a POST request against the /sales/opportunities/{id}/convertToProject endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Project: The parsed response data. """ - return self._parse_one(Project, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Project, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToSalesOrderEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToSalesOrderEndpoint.py index dc74c6ba8..23928458d 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToSalesOrderEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToSalesOrderEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesIdConverttosalesorderEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "convertToSalesOrder", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Order: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Order: """ Performs a POST request against the /sales/opportunities/{id}/convertToSalesOrder endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Order: The parsed response data. """ - return self._parse_one(Order, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Order, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToServiceTicketEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToServiceTicketEndpoint.py index 76b2ffe94..b83a1ca81 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToServiceTicketEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdConvertToServiceTicketEndpoint.py @@ -8,9 +8,13 @@ class SalesOpportunitiesIdConverttoserviceticketEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "convertToServiceTicket", parent_endpoint=parent_endpoint) + super().__init__( + client, "convertToServiceTicket", parent_endpoint=parent_endpoint + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Ticket: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Ticket: """ Performs a POST request against the /sales/opportunities/{id}/convertToServiceTicket endpoint. @@ -20,4 +24,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Ticket: The parsed response data. """ - return self._parse_one(Ticket, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Ticket, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdEndpoint.py index c4dbf6407..6e11fc1de 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdEndpoint.py @@ -1,18 +1,30 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdContactsEndpoint import SalesOpportunitiesIdContactsEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdConverttoagreementEndpoint import \ - SalesOpportunitiesIdConverttoagreementEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdConverttoprojectEndpoint import \ - SalesOpportunitiesIdConverttoprojectEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdConverttosalesorderEndpoint import \ - SalesOpportunitiesIdConverttosalesorderEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdConverttoserviceticketEndpoint import \ - SalesOpportunitiesIdConverttoserviceticketEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastEndpoint import SalesOpportunitiesIdForecastEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdNotesEndpoint import SalesOpportunitiesIdNotesEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdTeamEndpoint import SalesOpportunitiesIdTeamEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdContactsEndpoint import ( + SalesOpportunitiesIdContactsEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdConverttoagreementEndpoint import ( + SalesOpportunitiesIdConverttoagreementEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdConverttoprojectEndpoint import ( + SalesOpportunitiesIdConverttoprojectEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdConverttosalesorderEndpoint import ( + SalesOpportunitiesIdConverttosalesorderEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdConverttoserviceticketEndpoint import ( + SalesOpportunitiesIdConverttoserviceticketEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastEndpoint import ( + SalesOpportunitiesIdForecastEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdNotesEndpoint import ( + SalesOpportunitiesIdNotesEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdTeamEndpoint import ( + SalesOpportunitiesIdTeamEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Opportunity from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -22,28 +34,38 @@ class SalesOpportunitiesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) + self.convert_to_sales_order = self._register_child_endpoint( + SalesOpportunitiesIdConverttosalesorderEndpoint( + client, parent_endpoint=self + ) + ) + self.convert_to_service_ticket = self._register_child_endpoint( + SalesOpportunitiesIdConverttoserviceticketEndpoint( + client, parent_endpoint=self + ) + ) self.forecast = self._register_child_endpoint( SalesOpportunitiesIdForecastEndpoint(client, parent_endpoint=self) ) - self.convert_to_service_ticket = self._register_child_endpoint( - SalesOpportunitiesIdConverttoserviceticketEndpoint(client, parent_endpoint=self) + self.notes = self._register_child_endpoint( + SalesOpportunitiesIdNotesEndpoint(client, parent_endpoint=self) + ) + self.team = self._register_child_endpoint( + SalesOpportunitiesIdTeamEndpoint(client, parent_endpoint=self) ) self.convert_to_project = self._register_child_endpoint( SalesOpportunitiesIdConverttoprojectEndpoint(client, parent_endpoint=self) ) - self.notes = self._register_child_endpoint(SalesOpportunitiesIdNotesEndpoint(client, parent_endpoint=self)) - self.contacts = self._register_child_endpoint( - SalesOpportunitiesIdContactsEndpoint(client, parent_endpoint=self) - ) - self.convert_to_sales_order = self._register_child_endpoint( - SalesOpportunitiesIdConverttosalesorderEndpoint(client, parent_endpoint=self) - ) - self.team = self._register_child_endpoint(SalesOpportunitiesIdTeamEndpoint(client, parent_endpoint=self)) self.convert_to_agreement = self._register_child_endpoint( SalesOpportunitiesIdConverttoagreementEndpoint(client, parent_endpoint=self) ) + self.contacts = self._register_child_endpoint( + SalesOpportunitiesIdContactsEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Opportunity]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Opportunity]: """ Performs a GET request against the /sales/opportunities/{id} endpoint and returns an initialized PaginatedResponse object. @@ -64,7 +86,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Opportunity: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Opportunity: """ Performs a GET request against the /sales/opportunities/{id} endpoint. @@ -74,9 +98,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: Opportunity: The parsed response data. """ - return self._parse_one(Opportunity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Opportunity, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/opportunities/{id} endpoint. @@ -86,9 +114,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Opportunity: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Opportunity: """ Performs a PUT request against the /sales/opportunities/{id} endpoint. @@ -98,9 +131,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: Opportunity: The parsed response data. """ - return self._parse_one(Opportunity, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Opportunity, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Opportunity: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Opportunity: """ Performs a PATCH request against the /sales/opportunities/{id} endpoint. @@ -110,4 +147,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Opportunity: The parsed response data. """ - return self._parse_one(Opportunity, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Opportunity, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCopyEndpoint.py index 30e33ed01..de25777a2 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCopyEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastCopyIdEndpoint import \ - SalesOpportunitiesIdForecastCopyIdEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastCopyIdEndpoint import ( + SalesOpportunitiesIdForecastCopyIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> SalesOpportunitiesIdForecastCopyIdEndpoint: Returns: SalesOpportunitiesIdForecastCopyIdEndpoint: The initialized SalesOpportunitiesIdForecastCopyIdEndpoint object. """ - child = SalesOpportunitiesIdForecastCopyIdEndpoint(self.client, parent_endpoint=self) + child = SalesOpportunitiesIdForecastCopyIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCopyIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCopyIdEndpoint.py index a663797d6..30b2ac00f 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCopyIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCopyIdEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesIdForecastCopyIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /sales/opportunities/{id}/forecast/copy/{id} endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCountEndpoint.py index 314e1da21..1b049dbd2 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesIdForecastCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/{id}/forecast/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/{id}/forecast/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastEndpoint.py index 9ba93db64..06d9837b3 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastEndpoint.py @@ -1,11 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastCopyEndpoint import \ - SalesOpportunitiesIdForecastCopyEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastCountEndpoint import \ - SalesOpportunitiesIdForecastCountEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastIdEndpoint import SalesOpportunitiesIdForecastIdEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastCopyEndpoint import ( + SalesOpportunitiesIdForecastCopyEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastCountEndpoint import ( + SalesOpportunitiesIdForecastCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdForecastIdEndpoint import ( + SalesOpportunitiesIdForecastIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Forecast from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,12 +19,12 @@ class SalesOpportunitiesIdForecastEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "forecast", parent_endpoint=parent_endpoint) - self.copy = self._register_child_endpoint( - SalesOpportunitiesIdForecastCopyEndpoint(client, parent_endpoint=self) - ) self.count = self._register_child_endpoint( SalesOpportunitiesIdForecastCountEndpoint(client, parent_endpoint=self) ) + self.copy = self._register_child_endpoint( + SalesOpportunitiesIdForecastCopyEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesOpportunitiesIdForecastIdEndpoint: """ @@ -31,11 +35,15 @@ def id(self, id: int) -> SalesOpportunitiesIdForecastIdEndpoint: Returns: SalesOpportunitiesIdForecastIdEndpoint: The initialized SalesOpportunitiesIdForecastIdEndpoint object. """ - child = SalesOpportunitiesIdForecastIdEndpoint(self.client, parent_endpoint=self) + child = SalesOpportunitiesIdForecastIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Forecast]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Forecast]: """ Performs a GET request against the /sales/opportunities/{id}/forecast endpoint and returns an initialized PaginatedResponse object. @@ -56,7 +64,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Forecast]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Forecast]: """ Performs a GET request against the /sales/opportunities/{id}/forecast endpoint. @@ -66,9 +76,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Forecast]: The parsed response data. """ - return self._parse_many(Forecast, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Forecast, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Forecast: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Forecast: """ Performs a POST request against the /sales/opportunities/{id}/forecast endpoint. @@ -78,4 +92,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Forecast: The parsed response data. """ - return self._parse_one(Forecast, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Forecast, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastIdEndpoint.py index e573898cf..68b0cfe07 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdForecastIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ForecastItem: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ForecastItem: """ Performs a GET request against the /sales/opportunities/{id}/forecast/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> F Returns: ForecastItem: The parsed response data. """ - return self._parse_one(ForecastItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ForecastItem, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ForecastItem: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ForecastItem: """ Performs a POST request against the /sales/opportunities/{id}/forecast/{id} endpoint. @@ -55,9 +61,13 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ForecastItem: The parsed response data. """ - return self._parse_one(ForecastItem, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ForecastItem, super()._make_request("POST", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/opportunities/{id}/forecast/{id} endpoint. @@ -67,9 +77,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ForecastItem: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ForecastItem: """ Performs a PUT request against the /sales/opportunities/{id}/forecast/{id} endpoint. @@ -79,9 +94,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> F Returns: ForecastItem: The parsed response data. """ - return self._parse_one(ForecastItem, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ForecastItem, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ForecastItem: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ForecastItem: """ Performs a PATCH request against the /sales/opportunities/{id}/forecast/{id} endpoint. @@ -91,4 +110,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ForecastItem: The parsed response data. """ - return self._parse_one(ForecastItem, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ForecastItem, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesCountEndpoint.py index 1f50f2132..3ccee82c2 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesCountEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityNote]: """ Performs a GET request against the /sales/opportunities/{id}/notes/count endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityNote]: The parsed response data. """ - return self._parse_many(OpportunityNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityNote, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesEndpoint.py index dd6959b5c..6f8ec0116 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdNotesCountEndpoint import SalesOpportunitiesIdNotesCountEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdNotesIdEndpoint import SalesOpportunitiesIdNotesIdEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdNotesCountEndpoint import ( + SalesOpportunitiesIdNotesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdNotesIdEndpoint import ( + SalesOpportunitiesIdNotesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityNote from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SalesOpportunitiesIdNotesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "notes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesOpportunitiesIdNotesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesOpportunitiesIdNotesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesOpportunitiesIdNotesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityNote]: """ Performs a GET request against the /sales/opportunities/{id}/notes endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityNote]: The parsed response data. """ - return self._parse_many(OpportunityNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityNote, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityNote: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityNote: """ Performs a POST request against the /sales/opportunities/{id}/notes endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityNote: The parsed response data. """ - return self._parse_one(OpportunityNote, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + OpportunityNote, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesIdEndpoint.py index be496bfc1..46bf7ab6a 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdNotesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityNote: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityNote: """ Performs a GET request against the /sales/opportunities/{id}/notes/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityNote: The parsed response data. """ - return self._parse_one(OpportunityNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityNote, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/opportunities/{id}/notes/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityNote: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityNote: """ Performs a PUT request against the /sales/opportunities/{id}/notes/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityNote: The parsed response data. """ - return self._parse_one(OpportunityNote, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OpportunityNote, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityNote: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityNote: """ Performs a PATCH request against the /sales/opportunities/{id}/notes/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityNote: The parsed response data. """ - return self._parse_one(OpportunityNote, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OpportunityNote, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamCountEndpoint.py index a681849f5..72ecf0600 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesIdTeamCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/{id}/team/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/{id}/team/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamEndpoint.py index edc62c4ac..1fffcaf9d 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdTeamCountEndpoint import SalesOpportunitiesIdTeamCountEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesIdTeamIdEndpoint import SalesOpportunitiesIdTeamIdEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdTeamCountEndpoint import ( + SalesOpportunitiesIdTeamCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesIdTeamIdEndpoint import ( + SalesOpportunitiesIdTeamIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Team from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SalesOpportunitiesIdTeamEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "team", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesOpportunitiesIdTeamCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesOpportunitiesIdTeamCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesOpportunitiesIdTeamIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SalesOpportunitiesIdTeamIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Team]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Team]: """ Performs a GET request against the /sales/opportunities/{id}/team endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Team]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Team]: """ Performs a GET request against the /sales/opportunities/{id}/team endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Team]: The parsed response data. """ - return self._parse_many(Team, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Team, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Team: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Team: """ Performs a POST request against the /sales/opportunities/{id}/team endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Team: The parsed response data. """ - return self._parse_one(Team, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Team, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamIdEndpoint.py index 4e1075fbb..f5130aa39 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesIdTeamIdEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesIdTeamIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Team]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Team]: """ Performs a GET request against the /sales/opportunities/{id}/team/{id} endpoint and returns an initialized PaginatedResponse object. @@ -41,9 +43,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: Team: The parsed response data. """ - return self._parse_one(Team, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Team, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/opportunities/{id}/team/{id} endpoint. @@ -53,7 +59,10 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Team: """ @@ -65,9 +74,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: Team: The parsed response data. """ - return self._parse_one(Team, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Team, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Team: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Team: """ Performs a PATCH request against the /sales/opportunities/{id}/team/{id} endpoint. @@ -77,4 +90,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Team: The parsed response data. """ - return self._parse_one(Team, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Team, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsCountEndpoint.py index a202e36ae..c37e61df1 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesRatingsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/ratings/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/ratings/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsEndpoint.py index 87772e74d..03867d1e2 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsCountEndpoint import SalesOpportunitiesRatingsCountEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsIdEndpoint import SalesOpportunitiesRatingsIdEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsInfoEndpoint import SalesOpportunitiesRatingsInfoEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsCountEndpoint import ( + SalesOpportunitiesRatingsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsIdEndpoint import ( + SalesOpportunitiesRatingsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsInfoEndpoint import ( + SalesOpportunitiesRatingsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityRating from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SalesOpportunitiesRatingsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "ratings", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesOpportunitiesRatingsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SalesOpportunitiesRatingsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesOpportunitiesRatingsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SalesOpportunitiesRatingsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesOpportunitiesRatingsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityRating]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityRating]: """ Performs a GET request against the /sales/opportunities/ratings endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityRating]: The parsed response data. """ - return self._parse_many(OpportunityRating, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityRating, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityRating: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityRating: """ Performs a POST request against the /sales/opportunities/ratings endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityRating: The parsed response data. """ - return self._parse_one(OpportunityRating, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + OpportunityRating, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsIdEndpoint.py index a3121d89c..6972069b4 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsIdInfoEndpoint import \ - SalesOpportunitiesRatingsIdInfoEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsIdInfoEndpoint import ( + SalesOpportunitiesRatingsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityRating from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +13,9 @@ class SalesOpportunitiesRatingsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesOpportunitiesRatingsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SalesOpportunitiesRatingsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -37,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityRating: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityRating: """ Performs a GET request against the /sales/opportunities/ratings/{id} endpoint. @@ -47,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityRating: The parsed response data. """ - return self._parse_one(OpportunityRating, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityRating, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/opportunities/ratings/{id} endpoint. @@ -59,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityRating: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityRating: """ Performs a PUT request against the /sales/opportunities/ratings/{id} endpoint. @@ -71,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityRating: The parsed response data. """ - return self._parse_one(OpportunityRating, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OpportunityRating, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityRating: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityRating: """ Performs a PATCH request against the /sales/opportunities/ratings/{id} endpoint. @@ -83,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityRating: The parsed response data. """ - return self._parse_one(OpportunityRating, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OpportunityRating, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsIdInfoEndpoint.py index 25e8cffa6..1e2f1a76e 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityRatingInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityRatingInfo: """ Performs a GET request against the /sales/opportunities/ratings/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityRatingInfo: The parsed response data. """ - return self._parse_one(OpportunityRatingInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityRatingInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsInfoCountEndpoint.py index 0c2cce83c..d732bfdb1 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesRatingsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/ratings/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/ratings/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsInfoEndpoint.py index a45982282..4200f5a39 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesRatingsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsInfoCountEndpoint import \ - SalesOpportunitiesRatingsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesRatingsInfoCountEndpoint import ( + SalesOpportunitiesRatingsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityRatingInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityRatingInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityRatingInfo]: """ Performs a GET request against the /sales/opportunities/ratings/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityRatingInfo]: The parsed response data. """ - return self._parse_many(OpportunityRatingInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityRatingInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesCountEndpoint.py index 888fedebf..7c3fa4478 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesStatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/statuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/statuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesEndpoint.py index 0cfd38b7b..85a8ab8b4 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesEndpoint.py @@ -1,10 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesCountEndpoint import \ - SalesOpportunitiesStatusesCountEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesIdEndpoint import SalesOpportunitiesStatusesIdEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesInfoEndpoint import SalesOpportunitiesStatusesInfoEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesCountEndpoint import ( + SalesOpportunitiesStatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesIdEndpoint import ( + SalesOpportunitiesStatusesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesInfoEndpoint import ( + SalesOpportunitiesStatusesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,10 +19,12 @@ class SalesOpportunitiesStatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "statuses", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesOpportunitiesStatusesInfoEndpoint(client, parent_endpoint=self)) self.count = self._register_child_endpoint( SalesOpportunitiesStatusesCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + SalesOpportunitiesStatusesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesOpportunitiesStatusesIdEndpoint: """ @@ -55,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityStatus]: """ Performs a GET request against the /sales/opportunities/statuses endpoint. @@ -65,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityStatus]: The parsed response data. """ - return self._parse_many(OpportunityStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStatus: """ Performs a POST request against the /sales/opportunities/statuses endpoint. @@ -77,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityStatus: The parsed response data. """ - return self._parse_one(OpportunityStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + OpportunityStatus, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdEndpoint.py index 5875d6e5a..46fc81b3d 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesIdInfoEndpoint import \ - SalesOpportunitiesStatusesIdInfoEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesIdUsagesEndpoint import \ - SalesOpportunitiesStatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesIdInfoEndpoint import ( + SalesOpportunitiesStatusesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesIdUsagesEndpoint import ( + SalesOpportunitiesStatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,12 +16,12 @@ class SalesOpportunitiesStatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - SalesOpportunitiesStatusesIdInfoEndpoint(client, parent_endpoint=self) - ) self.usages = self._register_child_endpoint( SalesOpportunitiesStatusesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + SalesOpportunitiesStatusesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -44,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStatus: """ Performs a GET request against the /sales/opportunities/statuses/{id} endpoint. @@ -54,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityStatus: The parsed response data. """ - return self._parse_one(OpportunityStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/opportunities/statuses/{id} endpoint. @@ -66,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStatus: """ Performs a PUT request against the /sales/opportunities/statuses/{id} endpoint. @@ -78,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityStatus: The parsed response data. """ - return self._parse_one(OpportunityStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OpportunityStatus, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStatus: """ Performs a PATCH request against the /sales/opportunities/statuses/{id} endpoint. @@ -90,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityStatus: The parsed response data. """ - return self._parse_one(OpportunityStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OpportunityStatus, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdInfoEndpoint.py index f62e0f4eb..7d6bd7de3 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStatusInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStatusInfo: """ Performs a GET request against the /sales/opportunities/statuses/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityStatusInfo: The parsed response data. """ - return self._parse_one(OpportunityStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdUsagesEndpoint.py index 2592b4f73..1a3de0610 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesIdUsagesListEndpoint import \ - SalesOpportunitiesStatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesIdUsagesListEndpoint import ( + SalesOpportunitiesStatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): SalesOpportunitiesStatusesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/opportunities/statuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/opportunities/statuses/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdUsagesListEndpoint.py index debbacfdc..128ef0ebf 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesStatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/opportunities/statuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/opportunities/statuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesInfoCountEndpoint.py index 712bd581c..8bad83e70 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesStatusesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/statuses/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/statuses/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesInfoEndpoint.py index 3c89a5ca9..8e939a584 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesStatusesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesInfoCountEndpoint import \ - SalesOpportunitiesStatusesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesStatusesInfoCountEndpoint import ( + SalesOpportunitiesStatusesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityStatusInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityStatusInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityStatusInfo]: """ Performs a GET request against the /sales/opportunities/statuses/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityStatusInfo]: The parsed response data. """ - return self._parse_many(OpportunityStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesCountEndpoint.py index 96971c226..7dda29139 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesEndpoint.py index 7d61b8a5b..89a05a25c 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesCountEndpoint import SalesOpportunitiesTypesCountEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesIdEndpoint import SalesOpportunitiesTypesIdEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesInfoEndpoint import SalesOpportunitiesTypesInfoEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesCountEndpoint import ( + SalesOpportunitiesTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesIdEndpoint import ( + SalesOpportunitiesTypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesInfoEndpoint import ( + SalesOpportunitiesTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SalesOpportunitiesTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesOpportunitiesTypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SalesOpportunitiesTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesOpportunitiesTypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SalesOpportunitiesTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesOpportunitiesTypesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityType]: """ Performs a GET request against the /sales/opportunities/types endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityType]: The parsed response data. """ - return self._parse_many(OpportunityType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityType, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityType: """ Performs a POST request against the /sales/opportunities/types endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityType: The parsed response data. """ - return self._parse_one(OpportunityType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + OpportunityType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdEndpoint.py index c9427a3fb..f4e5a1f34 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesIdInfoEndpoint import SalesOpportunitiesTypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesIdUsagesEndpoint import \ - SalesOpportunitiesTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesIdInfoEndpoint import ( + SalesOpportunitiesTypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesIdUsagesEndpoint import ( + SalesOpportunitiesTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +16,12 @@ class SalesOpportunitiesTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesOpportunitiesTypesIdInfoEndpoint(client, parent_endpoint=self)) self.usages = self._register_child_endpoint( SalesOpportunitiesTypesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + SalesOpportunitiesTypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -41,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityType: """ Performs a GET request against the /sales/opportunities/types/{id} endpoint. @@ -51,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityType: The parsed response data. """ - return self._parse_one(OpportunityType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/opportunities/types/{id} endpoint. @@ -63,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityType: """ Performs a PUT request against the /sales/opportunities/types/{id} endpoint. @@ -75,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityType: The parsed response data. """ - return self._parse_one(OpportunityType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OpportunityType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityType: """ Performs a PATCH request against the /sales/opportunities/types/{id} endpoint. @@ -87,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityType: The parsed response data. """ - return self._parse_one(OpportunityType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OpportunityType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdInfoEndpoint.py index 9f6bf74b6..aefdf296e 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityTypeInfo: """ Performs a GET request against the /sales/opportunities/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityTypeInfo: The parsed response data. """ - return self._parse_one(OpportunityTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdUsagesEndpoint.py index 2aec9f231..6b29e9775 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesIdUsagesListEndpoint import \ - SalesOpportunitiesTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesIdUsagesListEndpoint import ( + SalesOpportunitiesTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): SalesOpportunitiesTypesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/opportunities/types/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/opportunities/types/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdUsagesListEndpoint.py index 1ab552709..d76cbb22b 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/opportunities/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/opportunities/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesInfoCountEndpoint.py index 7279ab48a..e5f83b856 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOpportunitiesTypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/opportunities/types/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/opportunities/types/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesInfoEndpoint.py index 1c44c2bd0..f19cc6fee 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOpportunitiesTypesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesInfoCountEndpoint import \ - SalesOpportunitiesTypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesOpportunitiesTypesInfoCountEndpoint import ( + SalesOpportunitiesTypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityTypeInfo]: """ Performs a GET request against the /sales/opportunities/types/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityTypeInfo]: The parsed response data. """ - return self._parse_many(OpportunityTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersCountEndpoint.py index 85b313225..f127398ad 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOrdersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/orders/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/orders/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersEndpoint.py index ee315b9e3..120302411 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersEndpoint.py @@ -1,9 +1,13 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersCountEndpoint import SalesOrdersCountEndpoint +from pyconnectwise.endpoints.manage.SalesOrdersCountEndpoint import ( + SalesOrdersCountEndpoint, +) from pyconnectwise.endpoints.manage.SalesOrdersIdEndpoint import SalesOrdersIdEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesEndpoint import SalesOrdersStatusesEndpoint +from pyconnectwise.endpoints.manage.SalesOrdersStatusesEndpoint import ( + SalesOrdersStatusesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Order from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +17,12 @@ class SalesOrdersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "orders", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesOrdersCountEndpoint(client, parent_endpoint=self)) - self.statuses = self._register_child_endpoint(SalesOrdersStatusesEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesOrdersCountEndpoint(client, parent_endpoint=self) + ) + self.statuses = self._register_child_endpoint( + SalesOrdersStatusesEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesOrdersIdEndpoint: """ @@ -29,7 +37,9 @@ def id(self, id: int) -> SalesOrdersIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Order]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Order]: """ Performs a GET request against the /sales/orders endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +60,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Order]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Order]: """ Performs a GET request against the /sales/orders endpoint. @@ -60,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Order]: The parsed response data. """ - return self._parse_many(Order, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Order, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Order: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Order: """ Performs a POST request against the /sales/orders endpoint. @@ -72,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Order: The parsed response data. """ - return self._parse_one(Order, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Order, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersIdConvertToServiceTicketEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersIdConvertToServiceTicketEndpoint.py index 4d028d23f..87231b639 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersIdConvertToServiceTicketEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersIdConvertToServiceTicketEndpoint.py @@ -8,9 +8,13 @@ class SalesOrdersIdConverttoserviceticketEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "convertToServiceTicket", parent_endpoint=parent_endpoint) + super().__init__( + client, "convertToServiceTicket", parent_endpoint=parent_endpoint + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Ticket: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Ticket: """ Performs a POST request against the /sales/orders/{id}/convertToServiceTicket endpoint. @@ -20,4 +24,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Ticket: The parsed response data. """ - return self._parse_one(Ticket, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Ticket, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersIdEndpoint.py index 16df6c9e0..3eed97e48 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersIdConverttoserviceticketEndpoint import \ - SalesOrdersIdConverttoserviceticketEndpoint +from pyconnectwise.endpoints.manage.SalesOrdersIdConverttoserviceticketEndpoint import ( + SalesOrdersIdConverttoserviceticketEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Order from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): SalesOrdersIdConverttoserviceticketEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Order]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Order]: """ Performs a GET request against the /sales/orders/{id} endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Order: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Order: """ Performs a GET request against the /sales/orders/{id} endpoint. @@ -47,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: Order: The parsed response data. """ - return self._parse_one(Order, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Order, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/orders/{id} endpoint. @@ -59,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Order: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Order: """ Performs a PUT request against the /sales/orders/{id} endpoint. @@ -71,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: Order: The parsed response data. """ - return self._parse_one(Order, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Order, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Order: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Order: """ Performs a PATCH request against the /sales/orders/{id} endpoint. @@ -83,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Order: The parsed response data. """ - return self._parse_one(Order, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Order, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesCountEndpoint.py index e767c8f87..ff537aae9 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOrdersStatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/orders/statuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/orders/statuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesEndpoint.py index a0f45dfaa..940ae3124 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesCountEndpoint import SalesOrdersStatusesCountEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdEndpoint import SalesOrdersStatusesIdEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesInfoEndpoint import SalesOrdersStatusesInfoEndpoint +from pyconnectwise.endpoints.manage.SalesOrdersStatusesCountEndpoint import ( + SalesOrdersStatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdEndpoint import ( + SalesOrdersStatusesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOrdersStatusesInfoEndpoint import ( + SalesOrdersStatusesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OrderStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SalesOrdersStatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "statuses", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesOrdersStatusesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SalesOrdersStatusesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesOrdersStatusesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SalesOrdersStatusesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesOrdersStatusesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> SalesOrdersStatusesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[OrderStatus]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[OrderStatus]: """ Performs a GET request against the /sales/orders/statuses endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OrderStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OrderStatus]: """ Performs a GET request against the /sales/orders/statuses endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OrderStatus]: The parsed response data. """ - return self._parse_many(OrderStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OrderStatus, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OrderStatus]: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OrderStatus]: """ Performs a POST request against the /sales/orders/statuses endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: list[OrderStatus]: The parsed response data. """ - return self._parse_many(OrderStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_many( + OrderStatus, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesCountEndpoint.py index 85e33074f..70a284f68 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOrdersStatusesIdEmailtemplatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/orders/statuses/{id}/emailtemplates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/orders/statuses/{id}/emailtemplates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesEndpoint.py index 66b6f7111..280a4fda2 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdEmailtemplatesCountEndpoint import \ - SalesOrdersStatusesIdEmailtemplatesCountEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdEmailtemplatesIdEndpoint import \ - SalesOrdersStatusesIdEmailtemplatesIdEndpoint +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdEmailtemplatesCountEndpoint import ( + SalesOrdersStatusesIdEmailtemplatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdEmailtemplatesIdEndpoint import ( + SalesOrdersStatusesIdEmailtemplatesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,7 +16,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "emailtemplates", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - SalesOrdersStatusesIdEmailtemplatesCountEndpoint(client, parent_endpoint=self) + SalesOrdersStatusesIdEmailtemplatesCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> SalesOrdersStatusesIdEmailtemplatesIdEndpoint: @@ -26,6 +30,8 @@ def id(self, id: int) -> SalesOrdersStatusesIdEmailtemplatesIdEndpoint: Returns: SalesOrdersStatusesIdEmailtemplatesIdEndpoint: The initialized SalesOrdersStatusesIdEmailtemplatesIdEndpoint object. """ - child = SalesOrdersStatusesIdEmailtemplatesIdEndpoint(self.client, parent_endpoint=self) + child = SalesOrdersStatusesIdEmailtemplatesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesIdEndpoint.py index 5c7d7cef6..2b0f038e7 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEmailtemplatesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatusEmailTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatusEmailTemplate: """ Performs a GET request against the /sales/orders/statuses/{id}/emailtemplates/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OrderStatusEmailTemplate: The parsed response data. """ - return self._parse_one(OrderStatusEmailTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OrderStatusEmailTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/orders/statuses/{id}/emailtemplates/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatusEmailTemplate: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatusEmailTemplate: """ Performs a PUT request against the /sales/orders/statuses/{id}/emailtemplates/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OrderStatusEmailTemplate: The parsed response data. """ - return self._parse_one(OrderStatusEmailTemplate, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OrderStatusEmailTemplate, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatusEmailTemplate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatusEmailTemplate: """ Performs a PATCH request against the /sales/orders/statuses/{id}/emailtemplates/{id} endpoint. @@ -80,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatusEmailTemplate: The parsed response data. """ return self._parse_one( - OrderStatusEmailTemplate, super()._make_request("PATCH", data=data, params=params).json() + OrderStatusEmailTemplate, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEndpoint.py index 6e160f32b..d03e6c4d8 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdEndpoint.py @@ -1,12 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdEmailtemplatesEndpoint import \ - SalesOrdersStatusesIdEmailtemplatesEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdInfoEndpoint import SalesOrdersStatusesIdInfoEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdNotificationsEndpoint import \ - SalesOrdersStatusesIdNotificationsEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdUsagesEndpoint import SalesOrdersStatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdEmailtemplatesEndpoint import ( + SalesOrdersStatusesIdEmailtemplatesEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdInfoEndpoint import ( + SalesOrdersStatusesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdNotificationsEndpoint import ( + SalesOrdersStatusesIdNotificationsEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdUsagesEndpoint import ( + SalesOrdersStatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OrderStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,16 +22,22 @@ class SalesOrdersStatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesOrdersStatusesIdInfoEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + SalesOrdersStatusesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SalesOrdersStatusesIdInfoEndpoint(client, parent_endpoint=self) + ) self.emailtemplates = self._register_child_endpoint( SalesOrdersStatusesIdEmailtemplatesEndpoint(client, parent_endpoint=self) ) - self.usages = self._register_child_endpoint(SalesOrdersStatusesIdUsagesEndpoint(client, parent_endpoint=self)) self.notifications = self._register_child_endpoint( SalesOrdersStatusesIdNotificationsEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[OrderStatus]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[OrderStatus]: """ Performs a GET request against the /sales/orders/statuses/{id} endpoint and returns an initialized PaginatedResponse object. @@ -46,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatus: """ Performs a GET request against the /sales/orders/statuses/{id} endpoint. @@ -56,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OrderStatus: The parsed response data. """ - return self._parse_one(OrderStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OrderStatus, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/orders/statuses/{id} endpoint. @@ -68,9 +86,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatus: """ Performs a PUT request against the /sales/orders/statuses/{id} endpoint. @@ -80,9 +103,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OrderStatus: The parsed response data. """ - return self._parse_one(OrderStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OrderStatus, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatus: """ Performs a PATCH request against the /sales/orders/statuses/{id} endpoint. @@ -92,4 +119,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OrderStatus: The parsed response data. """ - return self._parse_one(OrderStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OrderStatus, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdInfoEndpoint.py index b10c60419..2a4f707ae 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatusInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatusInfo: """ Performs a GET request against the /sales/orders/statuses/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OrderStatusInfo: The parsed response data. """ - return self._parse_one(OrderStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OrderStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsCountEndpoint.py index 1fba5cc12..d6082e221 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOrdersStatusesIdNotificationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/orders/statuses/{id}/notifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/orders/statuses/{id}/notifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsEndpoint.py index d983dd194..25153c7a9 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdNotificationsCountEndpoint import \ - SalesOrdersStatusesIdNotificationsCountEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdNotificationsIdEndpoint import \ - SalesOrdersStatusesIdNotificationsIdEndpoint +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdNotificationsCountEndpoint import ( + SalesOrdersStatusesIdNotificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdNotificationsIdEndpoint import ( + SalesOrdersStatusesIdNotificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OrderStatusNotification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "notifications", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - SalesOrdersStatusesIdNotificationsCountEndpoint(client, parent_endpoint=self) + SalesOrdersStatusesIdNotificationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> SalesOrdersStatusesIdNotificationsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> SalesOrdersStatusesIdNotificationsIdEndpoint: Returns: SalesOrdersStatusesIdNotificationsIdEndpoint: The initialized SalesOrdersStatusesIdNotificationsIdEndpoint object. """ - child = SalesOrdersStatusesIdNotificationsIdEndpoint(self.client, parent_endpoint=self) + child = SalesOrdersStatusesIdNotificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OrderStatusNotification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OrderStatusNotification]: """ Performs a GET request against the /sales/orders/statuses/{id}/notifications endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OrderStatusNotification]: The parsed response data. """ - return self._parse_many(OrderStatusNotification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OrderStatusNotification, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatusNotification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatusNotification: """ Performs a POST request against the /sales/orders/statuses/{id}/notifications endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OrderStatusNotification: The parsed response data. """ - return self._parse_one(OrderStatusNotification, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + OrderStatusNotification, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsIdEndpoint.py index 7698999b1..6ed5ab82b 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdNotificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatusNotification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatusNotification: """ Performs a GET request against the /sales/orders/statuses/{id}/notifications/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OrderStatusNotification: The parsed response data. """ - return self._parse_one(OrderStatusNotification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OrderStatusNotification, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/orders/statuses/{id}/notifications/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatusNotification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatusNotification: """ Performs a PUT request against the /sales/orders/statuses/{id}/notifications/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OrderStatusNotification: The parsed response data. """ - return self._parse_one(OrderStatusNotification, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OrderStatusNotification, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OrderStatusNotification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OrderStatusNotification: """ Performs a PATCH request against the /sales/orders/statuses/{id}/notifications/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OrderStatusNotification: The parsed response data. """ - return self._parse_one(OrderStatusNotification, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OrderStatusNotification, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdUsagesEndpoint.py index 039041e36..b6721508a 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdUsagesListEndpoint import \ - SalesOrdersStatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SalesOrdersStatusesIdUsagesListEndpoint import ( + SalesOrdersStatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,9 +13,13 @@ class SalesOrdersStatusesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(SalesOrdersStatusesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + SalesOrdersStatusesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/orders/statuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -35,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/orders/statuses/{id}/usages endpoint. @@ -45,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdUsagesListEndpoint.py index fd46d4626..44cbbb3c5 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SalesOrdersStatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/orders/statuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/orders/statuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesInfoCountEndpoint.py index ebb633060..24cb7a809 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesOrdersStatusesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/orders/statuses/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/orders/statuses/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesInfoEndpoint.py index eefc20c1d..7dcb49089 100644 --- a/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesOrdersStatusesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesOrdersStatusesInfoCountEndpoint import SalesOrdersStatusesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesOrdersStatusesInfoCountEndpoint import ( + SalesOrdersStatusesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OrderStatusInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SalesOrdersStatusesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesOrdersStatusesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesOrdersStatusesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OrderStatusInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OrderStatusInfo]: """ Performs a GET request against the /sales/orders/statuses/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OrderStatusInfo]: The parsed response data. """ - return self._parse_many(OrderStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OrderStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesCountEndpoint.py index 06d8bb2fa..6c3cc0ade 100644 --- a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesProbabilitiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/probabilities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/probabilities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesEndpoint.py index eb2113e24..6b2e37b25 100644 --- a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesProbabilitiesCountEndpoint import SalesProbabilitiesCountEndpoint -from pyconnectwise.endpoints.manage.SalesProbabilitiesIdEndpoint import SalesProbabilitiesIdEndpoint -from pyconnectwise.endpoints.manage.SalesProbabilitiesInfoEndpoint import SalesProbabilitiesInfoEndpoint +from pyconnectwise.endpoints.manage.SalesProbabilitiesCountEndpoint import ( + SalesProbabilitiesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesProbabilitiesIdEndpoint import ( + SalesProbabilitiesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SalesProbabilitiesInfoEndpoint import ( + SalesProbabilitiesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SalesProbability from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SalesProbabilitiesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "probabilities", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesProbabilitiesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SalesProbabilitiesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesProbabilitiesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SalesProbabilitiesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesProbabilitiesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SalesProbability]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SalesProbability]: """ Performs a GET request against the /sales/probabilities endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SalesProbability]: The parsed response data. """ - return self._parse_many(SalesProbability, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SalesProbability, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesProbability: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesProbability: """ Performs a POST request against the /sales/probabilities endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SalesProbability: The parsed response data. """ - return self._parse_one(SalesProbability, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SalesProbability, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesIdEndpoint.py index 447e05b6a..14026d9d4 100644 --- a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesProbabilitiesIdInfoEndpoint import SalesProbabilitiesIdInfoEndpoint +from pyconnectwise.endpoints.manage.SalesProbabilitiesIdInfoEndpoint import ( + SalesProbabilitiesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SalesProbability from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SalesProbabilitiesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesProbabilitiesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SalesProbabilitiesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesProbability: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesProbability: """ Performs a GET request against the /sales/probabilities/{id} endpoint. @@ -46,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SalesProbability: The parsed response data. """ - return self._parse_one(SalesProbability, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SalesProbability, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/probabilities/{id} endpoint. @@ -58,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesProbability: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesProbability: """ Performs a PUT request against the /sales/probabilities/{id} endpoint. @@ -70,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SalesProbability: The parsed response data. """ - return self._parse_one(SalesProbability, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SalesProbability, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesProbability: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesProbability: """ Performs a PATCH request against the /sales/probabilities/{id} endpoint. @@ -82,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SalesProbability: The parsed response data. """ - return self._parse_one(SalesProbability, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SalesProbability, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesIdInfoEndpoint.py index 24097edf2..ba80ff462 100644 --- a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesProbabilityInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesProbabilityInfo: """ Performs a GET request against the /sales/probabilities/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SalesProbabilityInfo: The parsed response data. """ - return self._parse_one(SalesProbabilityInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SalesProbabilityInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesInfoCountEndpoint.py index f8f05cd94..d91812923 100644 --- a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesProbabilitiesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/probabilities/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/probabilities/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesInfoEndpoint.py index eb416926d..5c6c7a4e1 100644 --- a/src/pyconnectwise/endpoints/manage/SalesProbabilitiesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesProbabilitiesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesProbabilitiesInfoCountEndpoint import SalesProbabilitiesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesProbabilitiesInfoCountEndpoint import ( + SalesProbabilitiesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SalesProbabilityInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SalesProbabilitiesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesProbabilitiesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesProbabilitiesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SalesProbabilityInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SalesProbabilityInfo]: """ Performs a GET request against the /sales/probabilities/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SalesProbabilityInfo]: The parsed response data. """ - return self._parse_many(SalesProbabilityInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SalesProbabilityInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesQuotasCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesQuotasCountEndpoint.py index 2eab9ea6e..3dea5086d 100644 --- a/src/pyconnectwise/endpoints/manage/SalesQuotasCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesQuotasCountEndpoint.py @@ -10,7 +10,9 @@ class SalesQuotasCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/quotas/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/quotas/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesQuotasEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesQuotasEndpoint.py index f6eebec40..346f3a78a 100644 --- a/src/pyconnectwise/endpoints/manage/SalesQuotasEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesQuotasEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesQuotasCountEndpoint import SalesQuotasCountEndpoint +from pyconnectwise.endpoints.manage.SalesQuotasCountEndpoint import ( + SalesQuotasCountEndpoint, +) from pyconnectwise.endpoints.manage.SalesQuotasIdEndpoint import SalesQuotasIdEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SalesQuota @@ -12,7 +14,9 @@ class SalesQuotasEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "quotas", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesQuotasCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesQuotasCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesQuotasIdEndpoint: """ @@ -27,7 +31,9 @@ def id(self, id: int) -> SalesQuotasIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SalesQuota]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SalesQuota]: """ Performs a GET request against the /sales/quotas endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +54,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SalesQuota]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SalesQuota]: """ Performs a GET request against the /sales/quotas endpoint. @@ -58,9 +66,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SalesQuota]: The parsed response data. """ - return self._parse_many(SalesQuota, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SalesQuota, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesQuota: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesQuota: """ Performs a POST request against the /sales/quotas endpoint. @@ -70,4 +82,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SalesQuota: The parsed response data. """ - return self._parse_one(SalesQuota, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SalesQuota, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesQuotasIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesQuotasIdEndpoint.py index c92184f8e..3455b5749 100644 --- a/src/pyconnectwise/endpoints/manage/SalesQuotasIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesQuotasIdEndpoint.py @@ -10,7 +10,9 @@ class SalesQuotasIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SalesQuota]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SalesQuota]: """ Performs a GET request against the /sales/quotas/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesQuota: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesQuota: """ Performs a GET request against the /sales/quotas/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SalesQuota: The parsed response data. """ - return self._parse_one(SalesQuota, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SalesQuota, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/quotas/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesQuota: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesQuota: """ Performs a PUT request against the /sales/quotas/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SalesQuota: The parsed response data. """ - return self._parse_one(SalesQuota, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SalesQuota, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesQuota: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesQuota: """ Performs a PATCH request against the /sales/quotas/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SalesQuota: The parsed response data. """ - return self._parse_one(SalesQuota, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SalesQuota, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesRolesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesRolesCountEndpoint.py index 3b8af272b..3b262af5f 100644 --- a/src/pyconnectwise/endpoints/manage/SalesRolesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesRolesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesRolesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/roles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/roles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesRolesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesRolesEndpoint.py index b93c8b218..4805d332a 100644 --- a/src/pyconnectwise/endpoints/manage/SalesRolesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesRolesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesRolesCountEndpoint import SalesRolesCountEndpoint +from pyconnectwise.endpoints.manage.SalesRolesCountEndpoint import ( + SalesRolesCountEndpoint, +) from pyconnectwise.endpoints.manage.SalesRolesIdEndpoint import SalesRolesIdEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Role @@ -12,7 +14,9 @@ class SalesRolesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "roles", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesRolesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesRolesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesRolesIdEndpoint: """ @@ -27,7 +31,9 @@ def id(self, id: int) -> SalesRolesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Role]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Role]: """ Performs a GET request against the /sales/roles endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +54,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Role]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Role]: """ Performs a GET request against the /sales/roles endpoint. @@ -58,9 +66,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Role]: The parsed response data. """ - return self._parse_many(Role, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Role, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Role: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Role: """ Performs a POST request against the /sales/roles endpoint. @@ -70,4 +82,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Role: The parsed response data. """ - return self._parse_one(Role, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Role, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesRolesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesRolesIdEndpoint.py index 0e8f4c098..015038c3a 100644 --- a/src/pyconnectwise/endpoints/manage/SalesRolesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesRolesIdEndpoint.py @@ -10,7 +10,9 @@ class SalesRolesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Role]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Role]: """ Performs a GET request against the /sales/roles/{id} endpoint and returns an initialized PaginatedResponse object. @@ -41,9 +43,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: Role: The parsed response data. """ - return self._parse_one(Role, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Role, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/roles/{id} endpoint. @@ -53,7 +59,10 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Role: """ @@ -65,9 +74,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: Role: The parsed response data. """ - return self._parse_one(Role, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Role, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Role: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Role: """ Performs a PATCH request against the /sales/roles/{id} endpoint. @@ -77,4 +90,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Role: The parsed response data. """ - return self._parse_one(Role, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Role, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsCountEndpoint.py index db1a77c2e..4fe809737 100644 --- a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsCountEndpoint.py @@ -10,7 +10,9 @@ class SalesSalesteamsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/salesTeams/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/salesTeams/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsEndpoint.py index 4a2f3d915..6e48e10bd 100644 --- a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesSalesteamsCountEndpoint import SalesSalesteamsCountEndpoint -from pyconnectwise.endpoints.manage.SalesSalesteamsIdEndpoint import SalesSalesteamsIdEndpoint +from pyconnectwise.endpoints.manage.SalesSalesteamsCountEndpoint import ( + SalesSalesteamsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesSalesteamsIdEndpoint import ( + SalesSalesteamsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SalesTeam from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SalesSalesteamsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "salesTeams", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesSalesteamsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesSalesteamsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesSalesteamsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SalesSalesteamsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SalesTeam]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SalesTeam]: """ Performs a GET request against the /sales/salesTeams endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SalesTeam]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SalesTeam]: """ Performs a GET request against the /sales/salesTeams endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SalesTeam]: The parsed response data. """ - return self._parse_many(SalesTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SalesTeam, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesTeam: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesTeam: """ Performs a POST request against the /sales/salesTeams endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SalesTeam: The parsed response data. """ - return self._parse_one(SalesTeam, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SalesTeam, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdEndpoint.py index fdd64a496..e2e014adf 100644 --- a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesSalesteamsIdMembersEndpoint import SalesSalesteamsIdMembersEndpoint +from pyconnectwise.endpoints.manage.SalesSalesteamsIdMembersEndpoint import ( + SalesSalesteamsIdMembersEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SalesTeam from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SalesSalesteamsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.members = self._register_child_endpoint(SalesSalesteamsIdMembersEndpoint(client, parent_endpoint=self)) + self.members = self._register_child_endpoint( + SalesSalesteamsIdMembersEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SalesTeam]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SalesTeam]: """ Performs a GET request against the /sales/salesTeams/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesTeam: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesTeam: """ Performs a GET request against the /sales/salesTeams/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SalesTeam: The parsed response data. """ - return self._parse_one(SalesTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SalesTeam, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/salesTeams/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesTeam: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesTeam: """ Performs a PUT request against the /sales/salesTeams/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SalesTeam: The parsed response data. """ - return self._parse_one(SalesTeam, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SalesTeam, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesTeam: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesTeam: """ Performs a PATCH request against the /sales/salesTeams/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SalesTeam: The parsed response data. """ - return self._parse_one(SalesTeam, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SalesTeam, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersCountEndpoint.py index f882ccf0d..4c30e539d 100644 --- a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersCountEndpoint.py @@ -10,7 +10,9 @@ class SalesSalesteamsIdMembersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/salesTeams/{id}/members/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/salesTeams/{id}/members/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersEndpoint.py index a228f3afd..3e7479ed0 100644 --- a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesSalesteamsIdMembersCountEndpoint import SalesSalesteamsIdMembersCountEndpoint -from pyconnectwise.endpoints.manage.SalesSalesteamsIdMembersIdEndpoint import SalesSalesteamsIdMembersIdEndpoint +from pyconnectwise.endpoints.manage.SalesSalesteamsIdMembersCountEndpoint import ( + SalesSalesteamsIdMembersCountEndpoint, +) +from pyconnectwise.endpoints.manage.SalesSalesteamsIdMembersIdEndpoint import ( + SalesSalesteamsIdMembersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SalesTeamMember from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SalesSalesteamsIdMembersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "members", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesSalesteamsIdMembersCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesSalesteamsIdMembersCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesSalesteamsIdMembersIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SalesTeamMember]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SalesTeamMember]: """ Performs a GET request against the /sales/salesTeams/{id}/members endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SalesTeamMember]: The parsed response data. """ - return self._parse_many(SalesTeamMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SalesTeamMember, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesTeamMember: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesTeamMember: """ Performs a POST request against the /sales/salesTeams/{id}/members endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SalesTeamMember: The parsed response data. """ - return self._parse_one(SalesTeamMember, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SalesTeamMember, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersIdEndpoint.py index 97ec4a699..0ad2246ba 100644 --- a/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesSalesTeamsIdMembersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesTeamMember: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesTeamMember: """ Performs a GET request against the /sales/salesTeams/{id}/members/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SalesTeamMember: The parsed response data. """ - return self._parse_one(SalesTeamMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SalesTeamMember, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/salesTeams/{id}/members/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesTeamMember: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesTeamMember: """ Performs a PUT request against the /sales/salesTeams/{id}/members/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SalesTeamMember: The parsed response data. """ - return self._parse_one(SalesTeamMember, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SalesTeamMember, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SalesTeamMember: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SalesTeamMember: """ Performs a PATCH request against the /sales/salesTeams/{id}/members/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SalesTeamMember: The parsed response data. """ - return self._parse_one(SalesTeamMember, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SalesTeamMember, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesScheduleEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesScheduleEndpoint.py index 586adfc13..f3c5589c0 100644 --- a/src/pyconnectwise/endpoints/manage/SalesScheduleEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesScheduleEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsEndpoint import SalesScheduleHolidaylistsEndpoint +from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsEndpoint import ( + SalesScheduleHolidaylistsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsEndpoint.py index f7154fd41..47a153081 100644 --- a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsIdEndpoint import SalesScheduleHolidaylistsIdEndpoint -from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsInfoEndpoint import SalesScheduleHolidaylistsInfoEndpoint +from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsIdEndpoint import ( + SalesScheduleHolidaylistsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsInfoEndpoint import ( + SalesScheduleHolidaylistsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class SalesScheduleHolidaylistsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "holidaylists", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesScheduleHolidaylistsInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SalesScheduleHolidaylistsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesScheduleHolidaylistsIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdEndpoint.py index 86a83b8dd..ecec13885 100644 --- a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsIdHolidaysEndpoint import \ - SalesScheduleHolidaylistsIdHolidaysEndpoint +from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsIdHolidaysEndpoint import ( + SalesScheduleHolidaylistsIdHolidaysEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysEndpoint.py index b6f29902f..db55ac158 100644 --- a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsIdHolidaysInfoEndpoint import \ - SalesScheduleHolidaylistsIdHolidaysInfoEndpoint +from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsIdHolidaysInfoEndpoint import ( + SalesScheduleHolidaylistsIdHolidaysInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,5 +13,7 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "holidays", parent_endpoint=parent_endpoint) self.info = self._register_child_endpoint( - SalesScheduleHolidaylistsIdHolidaysInfoEndpoint(client, parent_endpoint=self) + SalesScheduleHolidaylistsIdHolidaysInfoEndpoint( + client, parent_endpoint=self + ) ) diff --git a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint.py index 88bf2c5ee..7990eb0bc 100644 --- a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/schedule/holidaylists/{id}/holidays/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/schedule/holidaylists/{id}/holidays/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysInfoEndpoint.py index 6c42736a0..6b0e12cba 100644 --- a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsIdHolidaysInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint import \ - SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint import ( + SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,5 +13,7 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint(client, parent_endpoint=self) + SalesScheduleHolidaylistsIdHolidaysInfoCountEndpoint( + client, parent_endpoint=self + ) ) diff --git a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsInfoCountEndpoint.py index 43d9b3ef6..95c4a95dd 100644 --- a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesScheduleHolidaylistsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/schedule/holidaylists/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/schedule/holidaylists/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsInfoEndpoint.py index d227d84d5..7356c4bdb 100644 --- a/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesScheduleHolidaylistsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsInfoCountEndpoint import \ - SalesScheduleHolidaylistsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesScheduleHolidaylistsInfoCountEndpoint import ( + SalesScheduleHolidaylistsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SalesServiceEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesServiceEndpoint.py index ce8f6434a..2866e6b57 100644 --- a/src/pyconnectwise/endpoints/manage/SalesServiceEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesServiceEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesServicePriorityEndpoint import SalesServicePriorityEndpoint +from pyconnectwise.endpoints.manage.SalesServicePriorityEndpoint import ( + SalesServicePriorityEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class SalesServiceEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "service", parent_endpoint=parent_endpoint) - self.priority = self._register_child_endpoint(SalesServicePriorityEndpoint(client, parent_endpoint=self)) + self.priority = self._register_child_endpoint( + SalesServicePriorityEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesServicePriorityEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesServicePriorityEndpoint.py index f1e3a313c..2b8693c7e 100644 --- a/src/pyconnectwise/endpoints/manage/SalesServicePriorityEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesServicePriorityEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesServicePriorityInfoEndpoint import SalesServicePriorityInfoEndpoint +from pyconnectwise.endpoints.manage.SalesServicePriorityInfoEndpoint import ( + SalesServicePriorityInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class SalesServicePriorityEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "priority", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesServicePriorityInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SalesServicePriorityInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesServicePriorityInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesServicePriorityInfoCountEndpoint.py index 435577b1d..30f15c933 100644 --- a/src/pyconnectwise/endpoints/manage/SalesServicePriorityInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesServicePriorityInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesServicePriorityInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/service/priority/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/service/priority/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesServicePriorityInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesServicePriorityInfoEndpoint.py index fdeae55ac..6cf89a856 100644 --- a/src/pyconnectwise/endpoints/manage/SalesServicePriorityInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesServicePriorityInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesServicePriorityInfoCountEndpoint import SalesServicePriorityInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesServicePriorityInfoCountEndpoint import ( + SalesServicePriorityInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class SalesServicePriorityInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesServicePriorityInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesServicePriorityInfoCountEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesStagesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesStagesCountEndpoint.py index 4e7de9076..8b22abe98 100644 --- a/src/pyconnectwise/endpoints/manage/SalesStagesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesStagesCountEndpoint.py @@ -10,7 +10,9 @@ class SalesStagesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/stages/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/stages/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesStagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesStagesEndpoint.py index e0e62e6d2..f21818671 100644 --- a/src/pyconnectwise/endpoints/manage/SalesStagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesStagesEndpoint.py @@ -1,9 +1,13 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesStagesCountEndpoint import SalesStagesCountEndpoint +from pyconnectwise.endpoints.manage.SalesStagesCountEndpoint import ( + SalesStagesCountEndpoint, +) from pyconnectwise.endpoints.manage.SalesStagesIdEndpoint import SalesStagesIdEndpoint -from pyconnectwise.endpoints.manage.SalesStagesInfoEndpoint import SalesStagesInfoEndpoint +from pyconnectwise.endpoints.manage.SalesStagesInfoEndpoint import ( + SalesStagesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityStage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +17,12 @@ class SalesStagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "stages", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesStagesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SalesStagesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesStagesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SalesStagesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SalesStagesIdEndpoint: """ @@ -52,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityStage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityStage]: """ Performs a GET request against the /sales/stages endpoint. @@ -62,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityStage]: The parsed response data. """ - return self._parse_many(OpportunityStage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityStage, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStage: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStage: """ Performs a POST request against the /sales/stages endpoint. @@ -74,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityStage: The parsed response data. """ - return self._parse_one(OpportunityStage, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + OpportunityStage, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesStagesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesStagesIdEndpoint.py index 096374f93..226c19ce2 100644 --- a/src/pyconnectwise/endpoints/manage/SalesStagesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesStagesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesStagesIdInfoEndpoint import SalesStagesIdInfoEndpoint -from pyconnectwise.endpoints.manage.SalesStagesIdUsagesEndpoint import SalesStagesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.SalesStagesIdInfoEndpoint import ( + SalesStagesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.SalesStagesIdUsagesEndpoint import ( + SalesStagesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityStage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,8 +16,12 @@ class SalesStagesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SalesStagesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(SalesStagesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + SalesStagesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SalesStagesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -38,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStage: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStage: """ Performs a GET request against the /sales/stages/{id} endpoint. @@ -48,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityStage: The parsed response data. """ - return self._parse_one(OpportunityStage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityStage, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /sales/stages/{id} endpoint. @@ -60,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStage: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStage: """ Performs a PUT request against the /sales/stages/{id} endpoint. @@ -72,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityStage: The parsed response data. """ - return self._parse_one(OpportunityStage, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OpportunityStage, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStage: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStage: """ Performs a PATCH request against the /sales/stages/{id} endpoint. @@ -84,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OpportunityStage: The parsed response data. """ - return self._parse_one(OpportunityStage, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OpportunityStage, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesStagesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesStagesIdInfoEndpoint.py index d54b97276..e97b65285 100644 --- a/src/pyconnectwise/endpoints/manage/SalesStagesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesStagesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OpportunityStageInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OpportunityStageInfo: """ Performs a GET request against the /sales/stages/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OpportunityStageInfo: The parsed response data. """ - return self._parse_one(OpportunityStageInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OpportunityStageInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesStagesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesStagesIdUsagesEndpoint.py index 4943b94ae..83e44f237 100644 --- a/src/pyconnectwise/endpoints/manage/SalesStagesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesStagesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesStagesIdUsagesListEndpoint import SalesStagesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SalesStagesIdUsagesListEndpoint import ( + SalesStagesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SalesStagesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(SalesStagesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + SalesStagesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/stages/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/stages/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesStagesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesStagesIdUsagesListEndpoint.py index 58f61fe51..5ade3131e 100644 --- a/src/pyconnectwise/endpoints/manage/SalesStagesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesStagesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SalesStagesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /sales/stages/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /sales/stages/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesStagesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesStagesInfoCountEndpoint.py index 32c8df984..e790b909b 100644 --- a/src/pyconnectwise/endpoints/manage/SalesStagesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesStagesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SalesStagesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /sales/stages/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /sales/stages/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SalesStagesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SalesStagesInfoEndpoint.py index 1ddf56712..f1a4c1e1a 100644 --- a/src/pyconnectwise/endpoints/manage/SalesStagesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SalesStagesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SalesStagesInfoCountEndpoint import SalesStagesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SalesStagesInfoCountEndpoint import ( + SalesStagesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OpportunityStageInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SalesStagesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SalesStagesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SalesStagesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OpportunityStageInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OpportunityStageInfo]: """ Performs a GET request against the /sales/stages/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OpportunityStageInfo]: The parsed response data. """ - return self._parse_many(OpportunityStageInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OpportunityStageInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsCountEndpoint.py index d92a5bca9..7b3ec5195 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleCalendarsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Calendar]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Calendar]: """ Performs a GET request against the /schedule/calendars/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Calendar: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Calendar: """ Performs a GET request against the /schedule/calendars/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Calendar: The parsed response data. """ - return self._parse_one(Calendar, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Calendar, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsEndpoint.py index 07d139bb3..a9d4be0d7 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleCalendarsCountEndpoint import ScheduleCalendarsCountEndpoint -from pyconnectwise.endpoints.manage.ScheduleCalendarsIdEndpoint import ScheduleCalendarsIdEndpoint -from pyconnectwise.endpoints.manage.ScheduleCalendarsInfoEndpoint import ScheduleCalendarsInfoEndpoint +from pyconnectwise.endpoints.manage.ScheduleCalendarsCountEndpoint import ( + ScheduleCalendarsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleCalendarsIdEndpoint import ( + ScheduleCalendarsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleCalendarsInfoEndpoint import ( + ScheduleCalendarsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Calendar from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ScheduleCalendarsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "calendars", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ScheduleCalendarsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ScheduleCalendarsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleCalendarsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ScheduleCalendarsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScheduleCalendarsIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ScheduleCalendarsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Calendar]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Calendar]: """ Performs a GET request against the /schedule/calendars endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Calendar]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Calendar]: """ Performs a GET request against the /schedule/calendars endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Calendar]: The parsed response data. """ - return self._parse_many(Calendar, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Calendar, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Calendar: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Calendar: """ Performs a POST request against the /schedule/calendars endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Calendar: The parsed response data. """ - return self._parse_one(Calendar, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Calendar, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdCopyEndpoint.py index ffa8aa251..2283837f8 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdCopyEndpoint.py @@ -10,7 +10,9 @@ class ScheduleCalendarsIdCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Calendar: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Calendar: """ Performs a POST request against the /schedule/calendars/{id}/copy endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Calendar: The parsed response data. """ - return self._parse_one(Calendar, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Calendar, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdEndpoint.py index 101f129fd..5adf0f8b4 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleCalendarsIdCopyEndpoint import ScheduleCalendarsIdCopyEndpoint -from pyconnectwise.endpoints.manage.ScheduleCalendarsIdInfoEndpoint import ScheduleCalendarsIdInfoEndpoint -from pyconnectwise.endpoints.manage.ScheduleCalendarsIdUsagesEndpoint import ScheduleCalendarsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ScheduleCalendarsIdCopyEndpoint import ( + ScheduleCalendarsIdCopyEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleCalendarsIdInfoEndpoint import ( + ScheduleCalendarsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleCalendarsIdUsagesEndpoint import ( + ScheduleCalendarsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Calendar from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,11 +19,19 @@ class ScheduleCalendarsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ScheduleCalendarsIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ScheduleCalendarsIdUsagesEndpoint(client, parent_endpoint=self)) - self.copy = self._register_child_endpoint(ScheduleCalendarsIdCopyEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ScheduleCalendarsIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ScheduleCalendarsIdInfoEndpoint(client, parent_endpoint=self) + ) + self.copy = self._register_child_endpoint( + ScheduleCalendarsIdCopyEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Calendar]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Calendar]: """ Performs a GET request against the /schedule/calendars/{id} endpoint and returns an initialized PaginatedResponse object. @@ -38,7 +52,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Calendar: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Calendar: """ Performs a GET request against the /schedule/calendars/{id} endpoint. @@ -48,9 +64,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Calendar: The parsed response data. """ - return self._parse_one(Calendar, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Calendar, super()._make_request("GET", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Calendar: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Calendar: """ Performs a PATCH request against the /schedule/calendars/{id} endpoint. @@ -60,9 +80,13 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Calendar: The parsed response data. """ - return self._parse_one(Calendar, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Calendar, super()._make_request("PATCH", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Calendar: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Calendar: """ Performs a PUT request against the /schedule/calendars/{id} endpoint. @@ -72,9 +96,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Calendar: The parsed response data. """ - return self._parse_one(Calendar, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Calendar, super()._make_request("PUT", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /schedule/calendars/{id} endpoint. @@ -84,4 +112,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdInfoEndpoint.py index 3227224f2..ff2a3b443 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CalendarInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CalendarInfo: """ Performs a GET request against the /schedule/calendars/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CalendarInfo: The parsed response data. """ - return self._parse_one(CalendarInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CalendarInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdUsagesEndpoint.py index ec81bd192..b0a742586 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleCalendarsIdUsagesListEndpoint import ScheduleCalendarsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ScheduleCalendarsIdUsagesListEndpoint import ( + ScheduleCalendarsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ScheduleCalendarsIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ScheduleCalendarsIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ScheduleCalendarsIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /schedule/calendars/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /schedule/calendars/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdUsagesListEndpoint.py index 712f177a6..acb88965c 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ScheduleCalendarsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /schedule/calendars/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /schedule/calendars/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsInfoCountEndpoint.py index 8fc5bd968..dbac548e1 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsInfoCountEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CalendarInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CalendarInfo: """ Performs a GET request against the /schedule/calendars/info/count endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CalendarInfo: The parsed response data. """ - return self._parse_one(CalendarInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CalendarInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsInfoEndpoint.py index 01abe1898..424b47bad 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleCalendarsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleCalendarsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleCalendarsInfoCountEndpoint import ScheduleCalendarsInfoCountEndpoint +from pyconnectwise.endpoints.manage.ScheduleCalendarsInfoCountEndpoint import ( + ScheduleCalendarsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CalendarInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ScheduleCalendarsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ScheduleCalendarsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleCalendarsInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CalendarInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CalendarInfo]: """ Performs a GET request against the /schedule/calendars/info endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CalendarInfo]: The parsed response data. """ - return self._parse_many(CalendarInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CalendarInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleColorsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleColorsCountEndpoint.py index c6a6d0989..b944e8840 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleColorsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleColorsCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleColorsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/colors/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/colors/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleColorsEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleColorsEndpoint.py index cd3fdfceb..999342716 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleColorsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleColorsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleColorsCountEndpoint import ScheduleColorsCountEndpoint -from pyconnectwise.endpoints.manage.ScheduleColorsIdEndpoint import ScheduleColorsIdEndpoint -from pyconnectwise.endpoints.manage.ScheduleColorsResetEndpoint import ScheduleColorsResetEndpoint +from pyconnectwise.endpoints.manage.ScheduleColorsCountEndpoint import ( + ScheduleColorsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleColorsIdEndpoint import ( + ScheduleColorsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleColorsResetEndpoint import ( + ScheduleColorsResetEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleColor from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ScheduleColorsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "colors", parent_endpoint=parent_endpoint) - self.reset = self._register_child_endpoint(ScheduleColorsResetEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ScheduleColorsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleColorsCountEndpoint(client, parent_endpoint=self) + ) + self.reset = self._register_child_endpoint( + ScheduleColorsResetEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScheduleColorsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleColor]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleColor]: """ Performs a GET request against the /schedule/colors endpoint. @@ -62,4 +74,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleColor]: The parsed response data. """ - return self._parse_many(ScheduleColor, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleColor, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleColorsIdClearEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleColorsIdClearEndpoint.py index 2c7154f2f..4fb4e8183 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleColorsIdClearEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleColorsIdClearEndpoint.py @@ -10,7 +10,9 @@ class ScheduleColorsIdClearEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "clear", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleColor: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleColor: """ Performs a POST request against the /schedule/colors/{id}/clear endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleColor: The parsed response data. """ - return self._parse_one(ScheduleColor, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ScheduleColor, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleColorsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleColorsIdEndpoint.py index 175630c09..21c602e8f 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleColorsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleColorsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleColorsIdClearEndpoint import ScheduleColorsIdClearEndpoint +from pyconnectwise.endpoints.manage.ScheduleColorsIdClearEndpoint import ( + ScheduleColorsIdClearEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleColor from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ScheduleColorsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.clear = self._register_child_endpoint(ScheduleColorsIdClearEndpoint(client, parent_endpoint=self)) + self.clear = self._register_child_endpoint( + ScheduleColorsIdClearEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleColor: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleColor: """ Performs a GET request against the /schedule/colors/{id} endpoint. @@ -46,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleColor: The parsed response data. """ - return self._parse_one(ScheduleColor, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduleColor, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleColor: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleColor: """ Performs a PUT request against the /schedule/colors/{id} endpoint. @@ -58,9 +68,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleColor: The parsed response data. """ - return self._parse_one(ScheduleColor, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ScheduleColor, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleColor: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleColor: """ Performs a PATCH request against the /schedule/colors/{id} endpoint. @@ -70,4 +84,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleColor: The parsed response data. """ - return self._parse_one(ScheduleColor, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ScheduleColor, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleColorsResetEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleColorsResetEndpoint.py index 8e4ae9c2a..112c9770d 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleColorsResetEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleColorsResetEndpoint.py @@ -10,7 +10,9 @@ class ScheduleColorsResetEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "reset", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleColor]: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleColor]: """ Performs a POST request against the /schedule/colors/reset endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: list[ScheduleColor]: The parsed response data. """ - return self._parse_many(ScheduleColor, super()._make_request("POST", data=data, params=params).json()) + return self._parse_many( + ScheduleColor, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleDetailsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleDetailsCountEndpoint.py index 6fe5c9e04..c4410c976 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleDetailsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleDetailsCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleDetailsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/details/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/details/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleDetailsEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleDetailsEndpoint.py index 5c41f55da..7c621a288 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleDetailsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleDetailsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleDetailsCountEndpoint import ScheduleDetailsCountEndpoint -from pyconnectwise.endpoints.manage.ScheduleDetailsIdEndpoint import ScheduleDetailsIdEndpoint +from pyconnectwise.endpoints.manage.ScheduleDetailsCountEndpoint import ( + ScheduleDetailsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleDetailsIdEndpoint import ( + ScheduleDetailsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleEntryDetail from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ScheduleDetailsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "details", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ScheduleDetailsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleDetailsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScheduleDetailsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleEntryDetail]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleEntryDetail]: """ Performs a GET request against the /schedule/details endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleEntryDetail]: The parsed response data. """ - return self._parse_many(ScheduleEntryDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleEntryDetail, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleDetailsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleDetailsIdEndpoint.py index 1da15b60b..be8b31b82 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleDetailsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleDetailsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleEntryDetail: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleEntryDetail: """ Performs a GET request against the /schedule/details/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleEntryDetail: The parsed response data. """ - return self._parse_one(ScheduleEntryDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduleEntryDetail, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleEndpoint.py index b0bf3cd1a..c747147c5 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleEndpoint.py @@ -1,14 +1,28 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleCalendarsEndpoint import ScheduleCalendarsEndpoint +from pyconnectwise.endpoints.manage.ScheduleCalendarsEndpoint import ( + ScheduleCalendarsEndpoint, +) from pyconnectwise.endpoints.manage.ScheduleColorsEndpoint import ScheduleColorsEndpoint -from pyconnectwise.endpoints.manage.ScheduleDetailsEndpoint import ScheduleDetailsEndpoint -from pyconnectwise.endpoints.manage.ScheduleEntriesEndpoint import ScheduleEntriesEndpoint -from pyconnectwise.endpoints.manage.ScheduleHolidaylistsEndpoint import ScheduleHolidaylistsEndpoint -from pyconnectwise.endpoints.manage.SchedulePortalcalendarsEndpoint import SchedulePortalcalendarsEndpoint -from pyconnectwise.endpoints.manage.ScheduleRemindertimesEndpoint import ScheduleRemindertimesEndpoint -from pyconnectwise.endpoints.manage.ScheduleStatusesEndpoint import ScheduleStatusesEndpoint +from pyconnectwise.endpoints.manage.ScheduleDetailsEndpoint import ( + ScheduleDetailsEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleEntriesEndpoint import ( + ScheduleEntriesEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleHolidaylistsEndpoint import ( + ScheduleHolidaylistsEndpoint, +) +from pyconnectwise.endpoints.manage.SchedulePortalcalendarsEndpoint import ( + SchedulePortalcalendarsEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleRemindertimesEndpoint import ( + ScheduleRemindertimesEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleStatusesEndpoint import ( + ScheduleStatusesEndpoint, +) from pyconnectwise.endpoints.manage.ScheduleTypesEndpoint import ScheduleTypesEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -18,15 +32,33 @@ class ScheduleEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "schedule", parent_endpoint=parent_endpoint) - self.colors = self._register_child_endpoint(ScheduleColorsEndpoint(client, parent_endpoint=self)) - self.calendars = self._register_child_endpoint(ScheduleCalendarsEndpoint(client, parent_endpoint=self)) - self.entries = self._register_child_endpoint(ScheduleEntriesEndpoint(client, parent_endpoint=self)) - self.holidaylists = self._register_child_endpoint(ScheduleHolidaylistsEndpoint(client, parent_endpoint=self)) - self.holiday_lists = self._register_child_endpoint(ScheduleHolidaylistsEndpoint(client, parent_endpoint=self)) - self.details = self._register_child_endpoint(ScheduleDetailsEndpoint(client, parent_endpoint=self)) - self.types = self._register_child_endpoint(ScheduleTypesEndpoint(client, parent_endpoint=self)) + self.details = self._register_child_endpoint( + ScheduleDetailsEndpoint(client, parent_endpoint=self) + ) + self.calendars = self._register_child_endpoint( + ScheduleCalendarsEndpoint(client, parent_endpoint=self) + ) + self.entries = self._register_child_endpoint( + ScheduleEntriesEndpoint(client, parent_endpoint=self) + ) self.portalcalendars = self._register_child_endpoint( SchedulePortalcalendarsEndpoint(client, parent_endpoint=self) ) - self.reminder_times = self._register_child_endpoint(ScheduleRemindertimesEndpoint(client, parent_endpoint=self)) - self.statuses = self._register_child_endpoint(ScheduleStatusesEndpoint(client, parent_endpoint=self)) + self.holiday_lists = self._register_child_endpoint( + ScheduleHolidaylistsEndpoint(client, parent_endpoint=self) + ) + self.colors = self._register_child_endpoint( + ScheduleColorsEndpoint(client, parent_endpoint=self) + ) + self.reminder_times = self._register_child_endpoint( + ScheduleRemindertimesEndpoint(client, parent_endpoint=self) + ) + self.types = self._register_child_endpoint( + ScheduleTypesEndpoint(client, parent_endpoint=self) + ) + self.statuses = self._register_child_endpoint( + ScheduleStatusesEndpoint(client, parent_endpoint=self) + ) + self.holidaylists = self._register_child_endpoint( + ScheduleHolidaylistsEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleEntriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleEntriesCountEndpoint.py index fc649ed25..1645d5df6 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleEntriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleEntriesCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleEntriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/entries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/entries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleEntriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleEntriesEndpoint.py index 290b2e178..6a2f14d69 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleEntriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleEntriesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleEntriesCountEndpoint import ScheduleEntriesCountEndpoint -from pyconnectwise.endpoints.manage.ScheduleEntriesIdEndpoint import ScheduleEntriesIdEndpoint +from pyconnectwise.endpoints.manage.ScheduleEntriesCountEndpoint import ( + ScheduleEntriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleEntriesIdEndpoint import ( + ScheduleEntriesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleEntry from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ScheduleEntriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "entries", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ScheduleEntriesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleEntriesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScheduleEntriesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleEntry]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleEntry]: """ Performs a GET request against the /schedule/entries endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleEntry]: The parsed response data. """ - return self._parse_many(ScheduleEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleEntry, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleEntry: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleEntry: """ Performs a POST request against the /schedule/entries endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleEntry: The parsed response data. """ - return self._parse_one(ScheduleEntry, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ScheduleEntry, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsCountEndpoint.py index 5a6272478..7e7f38990 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleEntriesIdDetailsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/entries/{id}/details/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/entries/{id}/details/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsEndpoint.py index f2368d3f2..23ae3fc34 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleEntriesIdDetailsCountEndpoint import ScheduleEntriesIdDetailsCountEndpoint -from pyconnectwise.endpoints.manage.ScheduleEntriesIdDetailsIdEndpoint import ScheduleEntriesIdDetailsIdEndpoint +from pyconnectwise.endpoints.manage.ScheduleEntriesIdDetailsCountEndpoint import ( + ScheduleEntriesIdDetailsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleEntriesIdDetailsIdEndpoint import ( + ScheduleEntriesIdDetailsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleDetail from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ScheduleEntriesIdDetailsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "details", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ScheduleEntriesIdDetailsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleEntriesIdDetailsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScheduleEntriesIdDetailsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleDetail]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleDetail]: """ Performs a GET request against the /schedule/entries/{id}/details endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleDetail]: The parsed response data. """ - return self._parse_many(ScheduleDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleDetail, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsIdEndpoint.py index 736c9b2f7..b41b631de 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdDetailsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleDetail: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleDetail: """ Performs a GET request against the /schedule/entries/{id}/details/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleDetail: The parsed response data. """ - return self._parse_one(ScheduleDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduleDetail, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdEndpoint.py index 01580acc9..01f46ac80 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleEntriesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleEntriesIdDetailsEndpoint import ScheduleEntriesIdDetailsEndpoint +from pyconnectwise.endpoints.manage.ScheduleEntriesIdDetailsEndpoint import ( + ScheduleEntriesIdDetailsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleEntry from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ScheduleEntriesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.details = self._register_child_endpoint(ScheduleEntriesIdDetailsEndpoint(client, parent_endpoint=self)) + self.details = self._register_child_endpoint( + ScheduleEntriesIdDetailsEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleEntry: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleEntry: """ Performs a GET request against the /schedule/entries/{id} endpoint. @@ -46,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleEntry: The parsed response data. """ - return self._parse_one(ScheduleEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduleEntry, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /schedule/entries/{id} endpoint. @@ -58,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleEntry: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleEntry: """ Performs a PUT request against the /schedule/entries/{id} endpoint. @@ -70,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleEntry: The parsed response data. """ - return self._parse_one(ScheduleEntry, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ScheduleEntry, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleEntry: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleEntry: """ Performs a PATCH request against the /schedule/entries/{id} endpoint. @@ -82,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleEntry: The parsed response data. """ - return self._parse_one(ScheduleEntry, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ScheduleEntry, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsCopyEndpoint.py index 6ab24f89b..c179c161c 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsCopyEndpoint.py @@ -10,7 +10,9 @@ class ScheduleHolidaylistsCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> HolidayList: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> HolidayList: """ Performs a POST request against the /schedule/holidayLists/copy endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: HolidayList: The parsed response data. """ - return self._parse_one(HolidayList, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + HolidayList, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsCountEndpoint.py index 9fc1302df..4bfc35604 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleHolidaylistsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/holidayLists/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/holidayLists/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsEndpoint.py index 0b6d94157..f712b0ccf 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdEndpoint import ScheduleHolidaylistsIdEndpoint -from pyconnectwise.endpoints.manage.ScheduleHolidaylistsInfoEndpoint import ScheduleHolidaylistsInfoEndpoint +from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdEndpoint import ( + ScheduleHolidaylistsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleHolidaylistsInfoEndpoint import ( + ScheduleHolidaylistsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class ScheduleHolidaylistsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "holidaylists", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ScheduleHolidaylistsInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ScheduleHolidaylistsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScheduleHolidaylistsIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdEndpoint.py index 56adee1e0..b0e8b4017 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdHolidaysEndpoint import ScheduleHolidaylistsIdHolidaysEndpoint -from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdInfoEndpoint import ScheduleHolidaylistsIdInfoEndpoint +from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdHolidaysEndpoint import ( + ScheduleHolidaylistsIdHolidaysEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdInfoEndpoint import ( + ScheduleHolidaylistsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class ScheduleHolidaylistsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ScheduleHolidaylistsIdInfoEndpoint(client, parent_endpoint=self)) self.holidays = self._register_child_endpoint( ScheduleHolidaylistsIdHolidaysEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ScheduleHolidaylistsIdInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysCountEndpoint.py index 20b5ee29e..1da411275 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleHolidaylistsIdHolidaysCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/holidayLists/{id}/holidays/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/holidayLists/{id}/holidays/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysEndpoint.py index 26325dbd5..44ee3d754 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdHolidaysIdEndpoint import \ - ScheduleHolidaylistsIdHolidaysIdEndpoint -from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdHolidaysInfoEndpoint import \ - ScheduleHolidaylistsIdHolidaysInfoEndpoint +from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdHolidaysIdEndpoint import ( + ScheduleHolidaylistsIdHolidaysIdEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdHolidaysInfoEndpoint import ( + ScheduleHolidaylistsIdHolidaysInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,6 +28,8 @@ def id(self, id: int) -> ScheduleHolidaylistsIdHolidaysIdEndpoint: Returns: ScheduleHolidaylistsIdHolidaysIdEndpoint: The initialized ScheduleHolidaylistsIdHolidaysIdEndpoint object. """ - child = ScheduleHolidaylistsIdHolidaysIdEndpoint(self.client, parent_endpoint=self) + child = ScheduleHolidaylistsIdHolidaysIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysIdEndpoint.py index 497aa2516..bd5cf10fb 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdHolidaysIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdHolidaysIdInfoEndpoint import \ - ScheduleHolidaylistsIdHolidaysIdInfoEndpoint +from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdHolidaysIdInfoEndpoint import ( + ScheduleHolidaylistsIdHolidaysIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdUsagesEndpoint.py index deb546e4f..82f653ccb 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdUsagesListEndpoint import \ - ScheduleHolidaylistsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ScheduleHolidaylistsIdUsagesListEndpoint import ( + ScheduleHolidaylistsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ScheduleHolidaylistsIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /schedule/holidayLists/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /schedule/holidayLists/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdUsagesListEndpoint.py index 5d87b8155..582ba4b44 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidayListsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ScheduleHolidaylistsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /schedule/holidayLists/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /schedule/holidayLists/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdHolidaysIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdHolidaysIdInfoEndpoint.py index a2ad1e6e1..b457e0710 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdHolidaysIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdHolidaysIdInfoEndpoint.py @@ -10,7 +10,9 @@ class ScheduleHolidaylistsIdHolidaysIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[HolidayInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[HolidayInfo]: """ Performs a GET request against the /schedule/holidaylists/{id}/holidays/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> HolidayInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> HolidayInfo: """ Performs a GET request against the /schedule/holidaylists/{id}/holidays/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> H Returns: HolidayInfo: The parsed response data. """ - return self._parse_one(HolidayInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + HolidayInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdHolidaysInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdHolidaysInfoEndpoint.py index 718544ed3..5a2fc4add 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdHolidaysInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdHolidaysInfoEndpoint.py @@ -10,7 +10,9 @@ class ScheduleHolidaylistsIdHolidaysInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[HolidayInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[HolidayInfo]: """ Performs a GET request against the /schedule/holidaylists/{id}/holidays/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[HolidayInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[HolidayInfo]: """ Performs a GET request against the /schedule/holidaylists/{id}/holidays/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[HolidayInfo]: The parsed response data. """ - return self._parse_many(HolidayInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + HolidayInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdInfoEndpoint.py index 9c45c9c8a..d5727b61b 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> HolidayListInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> HolidayListInfo: """ Performs a GET request against the /schedule/holidaylists/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> H Returns: HolidayListInfo: The parsed response data. """ - return self._parse_one(HolidayListInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + HolidayListInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsInfoEndpoint.py index 981001225..bea240108 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleHolidaylistsInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[HolidayListInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[HolidayListInfo]: """ Performs a GET request against the /schedule/holidaylists/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[HolidayListInfo]: The parsed response data. """ - return self._parse_many(HolidayListInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + HolidayListInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsCountEndpoint.py index 67735402d..c15b06c1b 100644 --- a/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsCountEndpoint.py @@ -10,7 +10,9 @@ class SchedulePortalcalendarsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/portalcalendars/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/portalcalendars/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsEndpoint.py b/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsEndpoint.py index 0ec9b73b3..0a129fdce 100644 --- a/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SchedulePortalcalendarsCountEndpoint import SchedulePortalcalendarsCountEndpoint -from pyconnectwise.endpoints.manage.SchedulePortalcalendarsIdEndpoint import SchedulePortalcalendarsIdEndpoint +from pyconnectwise.endpoints.manage.SchedulePortalcalendarsCountEndpoint import ( + SchedulePortalcalendarsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SchedulePortalcalendarsIdEndpoint import ( + SchedulePortalcalendarsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalCalendar from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SchedulePortalcalendarsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "portalcalendars", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SchedulePortalcalendarsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SchedulePortalcalendarsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SchedulePortalcalendarsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PortalCalendar]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PortalCalendar]: """ Performs a GET request against the /schedule/portalcalendars endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PortalCalendar]: The parsed response data. """ - return self._parse_many(PortalCalendar, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PortalCalendar, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsIdEndpoint.py index 0f1931ae7..d4c529da9 100644 --- a/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SchedulePortalcalendarsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalCalendar: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalCalendar: """ Performs a GET request against the /schedule/portalcalendars/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalCalendar: The parsed response data. """ - return self._parse_one(PortalCalendar, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PortalCalendar, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalCalendar: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalCalendar: """ Performs a PUT request against the /schedule/portalcalendars/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalCalendar: The parsed response data. """ - return self._parse_one(PortalCalendar, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PortalCalendar, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalCalendar: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalCalendar: """ Performs a PATCH request against the /schedule/portalcalendars/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PortalCalendar: The parsed response data. """ - return self._parse_one(PortalCalendar, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PortalCalendar, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesCountEndpoint.py index 16d7f16c5..14b84b953 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleRemindertimesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/reminderTimes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/reminderTimes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesEndpoint.py index 4c73fb5e0..4b8cdde6d 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleRemindertimesCountEndpoint import ScheduleRemindertimesCountEndpoint -from pyconnectwise.endpoints.manage.ScheduleRemindertimesIdEndpoint import ScheduleRemindertimesIdEndpoint +from pyconnectwise.endpoints.manage.ScheduleRemindertimesCountEndpoint import ( + ScheduleRemindertimesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleRemindertimesIdEndpoint import ( + ScheduleRemindertimesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleReminderTime from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ScheduleRemindertimesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "reminderTimes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ScheduleRemindertimesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleRemindertimesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScheduleRemindertimesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleReminderTime]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleReminderTime]: """ Performs a GET request against the /schedule/reminderTimes endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleReminderTime]: The parsed response data. """ - return self._parse_many(ScheduleReminderTime, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleReminderTime, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesIdEndpoint.py index 9255278cb..45a5743c9 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleReminderTimesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleReminderTime: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleReminderTime: """ Performs a GET request against the /schedule/reminderTimes/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleReminderTime: The parsed response data. """ - return self._parse_one(ScheduleReminderTime, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduleReminderTime, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleReminderTime: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleReminderTime: """ Performs a PUT request against the /schedule/reminderTimes/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleReminderTime: The parsed response data. """ - return self._parse_one(ScheduleReminderTime, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ScheduleReminderTime, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleReminderTime: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleReminderTime: """ Performs a PATCH request against the /schedule/reminderTimes/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleReminderTime: The parsed response data. """ - return self._parse_one(ScheduleReminderTime, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ScheduleReminderTime, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleStatusesCountEndpoint.py index f46f20c2c..09cf5f46b 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleStatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/statuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/statuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleStatusesEndpoint.py index 7e6993a21..40ac6b4fc 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleStatusesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleStatusesCountEndpoint import ScheduleStatusesCountEndpoint -from pyconnectwise.endpoints.manage.ScheduleStatusesIdEndpoint import ScheduleStatusesIdEndpoint +from pyconnectwise.endpoints.manage.ScheduleStatusesCountEndpoint import ( + ScheduleStatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleStatusesIdEndpoint import ( + ScheduleStatusesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ScheduleStatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "statuses", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ScheduleStatusesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleStatusesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScheduleStatusesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleStatus]: """ Performs a GET request against the /schedule/statuses endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleStatus]: The parsed response data. """ - return self._parse_many(ScheduleStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleStatus: """ Performs a POST request against the /schedule/statuses endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleStatus: The parsed response data. """ - return self._parse_one(ScheduleStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ScheduleStatus, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleStatusesIdEndpoint.py index 552c48aa0..01f07f2ee 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleStatusesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleStatus: """ Performs a GET request against the /schedule/statuses/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleStatus: The parsed response data. """ - return self._parse_one(ScheduleStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduleStatus, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /schedule/statuses/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleStatus: """ Performs a PUT request against the /schedule/statuses/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleStatus: The parsed response data. """ - return self._parse_one(ScheduleStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ScheduleStatus, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleStatus: """ Performs a PATCH request against the /schedule/statuses/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleStatus: The parsed response data. """ - return self._parse_one(ScheduleStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ScheduleStatus, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleTypesCountEndpoint.py index e04e419b8..cbc178131 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleTypesCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleTypesEndpoint.py index 971f062cf..4075eb1f8 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleTypesCountEndpoint import ScheduleTypesCountEndpoint -from pyconnectwise.endpoints.manage.ScheduleTypesIdEndpoint import ScheduleTypesIdEndpoint -from pyconnectwise.endpoints.manage.ScheduleTypesInfoEndpoint import ScheduleTypesInfoEndpoint +from pyconnectwise.endpoints.manage.ScheduleTypesCountEndpoint import ( + ScheduleTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleTypesIdEndpoint import ( + ScheduleTypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleTypesInfoEndpoint import ( + ScheduleTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ScheduleTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ScheduleTypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ScheduleTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleTypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ScheduleTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ScheduleTypesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleType]: """ Performs a GET request against the /schedule/types endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleType]: The parsed response data. """ - return self._parse_many(ScheduleType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleType: """ Performs a POST request against the /schedule/types endpoint. @@ -74,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleType: The parsed response data. """ - return self._parse_one(ScheduleType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ScheduleType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleTypesIdEndpoint.py index 809532acc..451c5b2a9 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleTypesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleTypesIdInfoEndpoint import ScheduleTypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ScheduleTypesIdUsagesEndpoint import ScheduleTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ScheduleTypesIdInfoEndpoint import ( + ScheduleTypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ScheduleTypesIdUsagesEndpoint import ( + ScheduleTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,8 +16,12 @@ class ScheduleTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ScheduleTypesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ScheduleTypesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ScheduleTypesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ScheduleTypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -38,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleType: """ Performs a GET request against the /schedule/types/{id} endpoint. @@ -48,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleType: The parsed response data. """ - return self._parse_one(ScheduleType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduleType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /schedule/types/{id} endpoint. @@ -60,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleType: """ Performs a PUT request against the /schedule/types/{id} endpoint. @@ -72,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleType: The parsed response data. """ - return self._parse_one(ScheduleType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ScheduleType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleType: """ Performs a PATCH request against the /schedule/types/{id} endpoint. @@ -84,4 +107,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleType: The parsed response data. """ - return self._parse_one(ScheduleType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ScheduleType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleTypesIdInfoEndpoint.py index 4cb2bd77e..4eeed126b 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleTypeInfo: """ Performs a GET request against the /schedule/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleTypeInfo: The parsed response data. """ - return self._parse_one(ScheduleTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduleTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleTypesIdUsagesEndpoint.py index 411766323..29158d209 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleTypesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleTypesIdUsagesListEndpoint import ScheduleTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ScheduleTypesIdUsagesListEndpoint import ( + ScheduleTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ScheduleTypesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ScheduleTypesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ScheduleTypesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /schedule/types/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /schedule/types/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleTypesIdUsagesListEndpoint.py index 782a04bf6..1168f1521 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ScheduleTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /schedule/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /schedule/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleTypesInfoCountEndpoint.py index d98a99dce..6efd57cfc 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ScheduleTypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /schedule/types/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /schedule/types/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ScheduleTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ScheduleTypesInfoEndpoint.py index 425d01995..476015c6e 100644 --- a/src/pyconnectwise/endpoints/manage/ScheduleTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ScheduleTypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ScheduleTypesInfoCountEndpoint import ScheduleTypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ScheduleTypesInfoCountEndpoint import ( + ScheduleTypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ScheduleTypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ScheduleTypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ScheduleTypesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleTypeInfo]: """ Performs a GET request against the /schedule/types/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleTypeInfo]: The parsed response data. """ - return self._parse_many(ScheduleTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsCopyEndpoint.py index 16164fd44..7757f7080 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsCopyEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Board: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Board: """ Performs a POST request against the /service/boards/copy endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Board: The parsed response data. """ - return self._parse_one(Board, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Board, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsCountEndpoint.py index 91ef36000..e0e73487d 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsEndpoint.py index 20f666a6c..9af4bb2e3 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsCopyEndpoint import ServiceBoardsCopyEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsCountEndpoint import ServiceBoardsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdEndpoint import ServiceBoardsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsCopyEndpoint import ( + ServiceBoardsCopyEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsCountEndpoint import ( + ServiceBoardsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdEndpoint import ( + ServiceBoardsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Board from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ServiceBoardsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "boards", parent_endpoint=parent_endpoint) - self.copy = self._register_child_endpoint(ServiceBoardsCopyEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceBoardsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceBoardsCountEndpoint(client, parent_endpoint=self) + ) + self.copy = self._register_child_endpoint( + ServiceBoardsCopyEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceBoardsIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ServiceBoardsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Board]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Board]: """ Performs a GET request against the /service/boards endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Board]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Board]: """ Performs a GET request against the /service/boards endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Board]: The parsed response data. """ - return self._parse_many(Board, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Board, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Board: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Board: """ Performs a POST request against the /service/boards endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Board: The parsed response data. """ - return self._parse_one(Board, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Board, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesCountEndpoint.py index 63700e049..115d044fa 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdAutoassignresourcesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/autoAssignResources/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/autoAssignResources/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesEndpoint.py index 0ea8abd5e..aa63a6c78 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdAutoassignresourcesCountEndpoint import \ - ServiceBoardsIdAutoassignresourcesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdAutoassignresourcesIdEndpoint import \ - ServiceBoardsIdAutoassignresourcesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdAutoassignresourcesCountEndpoint import ( + ServiceBoardsIdAutoassignresourcesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdAutoassignresourcesIdEndpoint import ( + ServiceBoardsIdAutoassignresourcesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardAutoAssignResource from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "autoAssignResources", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ServiceBoardsIdAutoassignresourcesCountEndpoint(client, parent_endpoint=self) + ServiceBoardsIdAutoassignresourcesCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ServiceBoardsIdAutoassignresourcesIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ServiceBoardsIdAutoassignresourcesIdEndpoint: Returns: ServiceBoardsIdAutoassignresourcesIdEndpoint: The initialized ServiceBoardsIdAutoassignresourcesIdEndpoint object. """ - child = ServiceBoardsIdAutoassignresourcesIdEndpoint(self.client, parent_endpoint=self) + child = ServiceBoardsIdAutoassignresourcesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardAutoAssignResource]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardAutoAssignResource]: """ Performs a GET request against the /service/boards/{id}/autoAssignResources endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardAutoAssignResource]: The parsed response data. """ - return self._parse_many(BoardAutoAssignResource, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardAutoAssignResource, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardAutoAssignResource: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardAutoAssignResource: """ Performs a POST request against the /service/boards/{id}/autoAssignResources endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardAutoAssignResource: The parsed response data. """ - return self._parse_one(BoardAutoAssignResource, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardAutoAssignResource, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesIdEndpoint.py index 40d6832aa..2333aee3a 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoAssignResourcesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardAutoAssignResource: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardAutoAssignResource: """ Performs a GET request against the /service/boards/{id}/autoAssignResources/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardAutoAssignResource: The parsed response data. """ - return self._parse_one(BoardAutoAssignResource, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardAutoAssignResource, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/autoAssignResources/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardAutoAssignResource: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardAutoAssignResource: """ Performs a PUT request against the /service/boards/{id}/autoAssignResources/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardAutoAssignResource: The parsed response data. """ - return self._parse_one(BoardAutoAssignResource, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardAutoAssignResource, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardAutoAssignResource: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardAutoAssignResource: """ Performs a PATCH request against the /service/boards/{id}/autoAssignResources/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardAutoAssignResource: The parsed response data. """ - return self._parse_one(BoardAutoAssignResource, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardAutoAssignResource, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesCountEndpoint.py index c2a9fcc0d..f24b7ee1a 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdAutotemplatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/autoTemplates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/autoTemplates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesEndpoint.py index 6eb1b720a..2c636888b 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdAutotemplatesCountEndpoint import \ - ServiceBoardsIdAutotemplatesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdAutotemplatesIdEndpoint import ServiceBoardsIdAutotemplatesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdAutotemplatesCountEndpoint import ( + ServiceBoardsIdAutotemplatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdAutotemplatesIdEndpoint import ( + ServiceBoardsIdAutotemplatesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardAutoTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> ServiceBoardsIdAutotemplatesIdEndpoint: Returns: ServiceBoardsIdAutotemplatesIdEndpoint: The initialized ServiceBoardsIdAutotemplatesIdEndpoint object. """ - child = ServiceBoardsIdAutotemplatesIdEndpoint(self.client, parent_endpoint=self) + child = ServiceBoardsIdAutotemplatesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardAutoTemplate]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardAutoTemplate]: """ Performs a GET request against the /service/boards/{id}/autoTemplates endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardAutoTemplate]: The parsed response data. """ - return self._parse_many(BoardAutoTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardAutoTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardAutoTemplate: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardAutoTemplate: """ Performs a POST request against the /service/boards/{id}/autoTemplates endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardAutoTemplate: The parsed response data. """ - return self._parse_one(BoardAutoTemplate, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardAutoTemplate, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesIdEndpoint.py index ca78412db..3fdf475dc 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdAutoTemplatesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardAutoTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardAutoTemplate: """ Performs a GET request against the /service/boards/{id}/autoTemplates/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardAutoTemplate: The parsed response data. """ - return self._parse_one(BoardAutoTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardAutoTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/autoTemplates/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardAutoTemplate: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardAutoTemplate: """ Performs a PUT request against the /service/boards/{id}/autoTemplates/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardAutoTemplate: The parsed response data. """ - return self._parse_one(BoardAutoTemplate, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardAutoTemplate, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardAutoTemplate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardAutoTemplate: """ Performs a PATCH request against the /service/boards/{id}/autoTemplates/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardAutoTemplate: The parsed response data. """ - return self._parse_one(BoardAutoTemplate, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardAutoTemplate, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdEndpoint.py index 77189f375..3841b30ba 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdEndpoint.py @@ -1,19 +1,39 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdAutoassignresourcesEndpoint import \ - ServiceBoardsIdAutoassignresourcesEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdAutotemplatesEndpoint import ServiceBoardsIdAutotemplatesEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdExcludedmembersEndpoint import ServiceBoardsIdExcludedmembersEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsEndpoint import ServiceBoardsIdItemsEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdNotificationsEndpoint import ServiceBoardsIdNotificationsEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesEndpoint import ServiceBoardsIdStatusesEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesEndpoint import ServiceBoardsIdSubtypesEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsEndpoint import ServiceBoardsIdTeamsEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesEndpoint import ServiceBoardsIdTypesEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesubtypeitemassociationsEndpoint import \ - ServiceBoardsIdTypesubtypeitemassociationsEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdUsagesEndpoint import ServiceBoardsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdAutoassignresourcesEndpoint import ( + ServiceBoardsIdAutoassignresourcesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdAutotemplatesEndpoint import ( + ServiceBoardsIdAutotemplatesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdExcludedmembersEndpoint import ( + ServiceBoardsIdExcludedmembersEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsEndpoint import ( + ServiceBoardsIdItemsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdNotificationsEndpoint import ( + ServiceBoardsIdNotificationsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesEndpoint import ( + ServiceBoardsIdStatusesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesEndpoint import ( + ServiceBoardsIdSubtypesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsEndpoint import ( + ServiceBoardsIdTeamsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesEndpoint import ( + ServiceBoardsIdTypesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesubtypeitemassociationsEndpoint import ( + ServiceBoardsIdTypesubtypeitemassociationsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdUsagesEndpoint import ( + ServiceBoardsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Board from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -23,29 +43,45 @@ class ServiceBoardsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.teams = self._register_child_endpoint(ServiceBoardsIdTeamsEndpoint(client, parent_endpoint=self)) - self.subtypes = self._register_child_endpoint(ServiceBoardsIdSubtypesEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ServiceBoardsIdUsagesEndpoint(client, parent_endpoint=self)) - self.types = self._register_child_endpoint(ServiceBoardsIdTypesEndpoint(client, parent_endpoint=self)) - self.auto_assign_resources = self._register_child_endpoint( - ServiceBoardsIdAutoassignresourcesEndpoint(client, parent_endpoint=self) + self.notifications = self._register_child_endpoint( + ServiceBoardsIdNotificationsEndpoint(client, parent_endpoint=self) ) - self.excluded_members = self._register_child_endpoint( - ServiceBoardsIdExcludedmembersEndpoint(client, parent_endpoint=self) + self.type_sub_type_item_associations = self._register_child_endpoint( + ServiceBoardsIdTypesubtypeitemassociationsEndpoint( + client, parent_endpoint=self + ) ) - self.items = self._register_child_endpoint(ServiceBoardsIdItemsEndpoint(client, parent_endpoint=self)) self.auto_templates = self._register_child_endpoint( ServiceBoardsIdAutotemplatesEndpoint(client, parent_endpoint=self) ) - self.notifications = self._register_child_endpoint( - ServiceBoardsIdNotificationsEndpoint(client, parent_endpoint=self) + self.excluded_members = self._register_child_endpoint( + ServiceBoardsIdExcludedmembersEndpoint(client, parent_endpoint=self) ) - self.type_sub_type_item_associations = self._register_child_endpoint( - ServiceBoardsIdTypesubtypeitemassociationsEndpoint(client, parent_endpoint=self) + self.teams = self._register_child_endpoint( + ServiceBoardsIdTeamsEndpoint(client, parent_endpoint=self) + ) + self.auto_assign_resources = self._register_child_endpoint( + ServiceBoardsIdAutoassignresourcesEndpoint(client, parent_endpoint=self) + ) + self.usages = self._register_child_endpoint( + ServiceBoardsIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.subtypes = self._register_child_endpoint( + ServiceBoardsIdSubtypesEndpoint(client, parent_endpoint=self) + ) + self.types = self._register_child_endpoint( + ServiceBoardsIdTypesEndpoint(client, parent_endpoint=self) + ) + self.items = self._register_child_endpoint( + ServiceBoardsIdItemsEndpoint(client, parent_endpoint=self) + ) + self.statuses = self._register_child_endpoint( + ServiceBoardsIdStatusesEndpoint(client, parent_endpoint=self) ) - self.statuses = self._register_child_endpoint(ServiceBoardsIdStatusesEndpoint(client, parent_endpoint=self)) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Board]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Board]: """ Performs a GET request against the /service/boards/{id} endpoint and returns an initialized PaginatedResponse object. @@ -66,7 +102,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Board: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Board: """ Performs a GET request against the /service/boards/{id} endpoint. @@ -76,9 +114,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: Board: The parsed response data. """ - return self._parse_one(Board, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Board, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id} endpoint. @@ -88,9 +130,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Board: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Board: """ Performs a PUT request against the /service/boards/{id} endpoint. @@ -100,9 +147,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: Board: The parsed response data. """ - return self._parse_one(Board, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Board, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Board: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Board: """ Performs a PATCH request against the /service/boards/{id} endpoint. @@ -112,4 +163,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Board: The parsed response data. """ - return self._parse_one(Board, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Board, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersCountEndpoint.py index 5271047a3..31ab1166c 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdExcludedmembersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/excludedMembers/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/excludedMembers/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersEndpoint.py index 2a19c7fa1..a4f5cbde4 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdExcludedmembersCountEndpoint import \ - ServiceBoardsIdExcludedmembersCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdExcludedmembersIdEndpoint import \ - ServiceBoardsIdExcludedmembersIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdExcludedmembersCountEndpoint import ( + ServiceBoardsIdExcludedmembersCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdExcludedmembersIdEndpoint import ( + ServiceBoardsIdExcludedmembersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardExcludedMember from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ServiceBoardsIdExcludedmembersIdEndpoint: Returns: ServiceBoardsIdExcludedmembersIdEndpoint: The initialized ServiceBoardsIdExcludedmembersIdEndpoint object. """ - child = ServiceBoardsIdExcludedmembersIdEndpoint(self.client, parent_endpoint=self) + child = ServiceBoardsIdExcludedmembersIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardExcludedMember]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardExcludedMember]: """ Performs a GET request against the /service/boards/{id}/excludedMembers endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardExcludedMember]: The parsed response data. """ - return self._parse_many(BoardExcludedMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardExcludedMember, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardExcludedMember: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardExcludedMember: """ Performs a POST request against the /service/boards/{id}/excludedMembers endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardExcludedMember: The parsed response data. """ - return self._parse_one(BoardExcludedMember, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardExcludedMember, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersIdEndpoint.py index 5799d7d50..1a5d797ef 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdExcludedMembersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardExcludedMember: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardExcludedMember: """ Performs a GET request against the /service/boards/{id}/excludedMembers/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardExcludedMember: The parsed response data. """ - return self._parse_one(BoardExcludedMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardExcludedMember, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/excludedMembers/{id} endpoint. @@ -55,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsCountEndpoint.py index d6879d8ab..ea5bca12b 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdItemsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/items/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/items/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsEndpoint.py index 5b98ae3c3..57d384807 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsCountEndpoint import ServiceBoardsIdItemsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdEndpoint import ServiceBoardsIdItemsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsCountEndpoint import ( + ServiceBoardsIdItemsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdEndpoint import ( + ServiceBoardsIdItemsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardItem from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceBoardsIdItemsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "items", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceBoardsIdItemsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceBoardsIdItemsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceBoardsIdItemsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceBoardsIdItemsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardItem]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardItem]: """ Performs a GET request against the /service/boards/{id}/items endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardItem]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardItem]: """ Performs a GET request against the /service/boards/{id}/items endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardItem]: The parsed response data. """ - return self._parse_many(BoardItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardItem, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardItem: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardItem: """ Performs a POST request against the /service/boards/{id}/items endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardItem: The parsed response data. """ - return self._parse_one(BoardItem, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardItem, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsCountEndpoint.py index e279170d7..81d674e31 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdItemsIdAssociationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/items/{id}/associations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/items/{id}/associations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsEndpoint.py index 368c9352d..bed702bb6 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdAssociationsCountEndpoint import \ - ServiceBoardsIdItemsIdAssociationsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdAssociationsIdEndpoint import \ - ServiceBoardsIdItemsIdAssociationsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdAssociationsCountEndpoint import ( + ServiceBoardsIdItemsIdAssociationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdAssociationsIdEndpoint import ( + ServiceBoardsIdItemsIdAssociationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardItemAssociation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "associations", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ServiceBoardsIdItemsIdAssociationsCountEndpoint(client, parent_endpoint=self) + ServiceBoardsIdItemsIdAssociationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ServiceBoardsIdItemsIdAssociationsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ServiceBoardsIdItemsIdAssociationsIdEndpoint: Returns: ServiceBoardsIdItemsIdAssociationsIdEndpoint: The initialized ServiceBoardsIdItemsIdAssociationsIdEndpoint object. """ - child = ServiceBoardsIdItemsIdAssociationsIdEndpoint(self.client, parent_endpoint=self) + child = ServiceBoardsIdItemsIdAssociationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardItemAssociation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardItemAssociation]: """ Performs a GET request against the /service/boards/{id}/items/{id}/associations endpoint. @@ -64,4 +72,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardItemAssociation]: The parsed response data. """ - return self._parse_many(BoardItemAssociation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardItemAssociation, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsIdEndpoint.py index 8986a7031..7ea8e7180 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdAssociationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardItemAssociation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardItemAssociation: """ Performs a GET request against the /service/boards/{id}/items/{id}/associations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardItemAssociation: The parsed response data. """ - return self._parse_one(BoardItemAssociation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardItemAssociation, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardItemAssociation: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardItemAssociation: """ Performs a PUT request against the /service/boards/{id}/items/{id}/associations/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardItemAssociation: The parsed response data. """ - return self._parse_one(BoardItemAssociation, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardItemAssociation, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardItemAssociation: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardItemAssociation: """ Performs a PATCH request against the /service/boards/{id}/items/{id}/associations/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardItemAssociation: The parsed response data. """ - return self._parse_one(BoardItemAssociation, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardItemAssociation, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdEndpoint.py index fb2490148..c1207f2b4 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdAssociationsEndpoint import \ - ServiceBoardsIdItemsIdAssociationsEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdUsagesEndpoint import ServiceBoardsIdItemsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdAssociationsEndpoint import ( + ServiceBoardsIdItemsIdAssociationsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdUsagesEndpoint import ( + ServiceBoardsIdItemsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardItem from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,9 +19,13 @@ def __init__(self, client, parent_endpoint=None): self.associations = self._register_child_endpoint( ServiceBoardsIdItemsIdAssociationsEndpoint(client, parent_endpoint=self) ) - self.usages = self._register_child_endpoint(ServiceBoardsIdItemsIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ServiceBoardsIdItemsIdUsagesEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardItem]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardItem]: """ Performs a GET request against the /service/boards/{id}/items/{id} endpoint and returns an initialized PaginatedResponse object. @@ -39,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardItem: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardItem: """ Performs a GET request against the /service/boards/{id}/items/{id} endpoint. @@ -49,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardItem: The parsed response data. """ - return self._parse_one(BoardItem, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardItem, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/items/{id} endpoint. @@ -61,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardItem: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardItem: """ Performs a PUT request against the /service/boards/{id}/items/{id} endpoint. @@ -73,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardItem: The parsed response data. """ - return self._parse_one(BoardItem, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardItem, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardItem: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardItem: """ Performs a PATCH request against the /service/boards/{id}/items/{id} endpoint. @@ -85,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardItem: The parsed response data. """ - return self._parse_one(BoardItem, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardItem, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdUsagesEndpoint.py index 50c812362..0aa8f70f2 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdUsagesListEndpoint import \ - ServiceBoardsIdItemsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdItemsIdUsagesListEndpoint import ( + ServiceBoardsIdItemsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ServiceBoardsIdItemsIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/items/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/items/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdUsagesListEndpoint.py index 4df076896..554e766f6 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdItemsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdItemsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/items/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/items/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsCountEndpoint.py index 2d9004af8..812fce3f3 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdNotificationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/notifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/notifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsEndpoint.py index 187e7ff47..ac90b3536 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdNotificationsCountEndpoint import \ - ServiceBoardsIdNotificationsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdNotificationsIdEndpoint import ServiceBoardsIdNotificationsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdNotificationsCountEndpoint import ( + ServiceBoardsIdNotificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdNotificationsIdEndpoint import ( + ServiceBoardsIdNotificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardNotification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> ServiceBoardsIdNotificationsIdEndpoint: Returns: ServiceBoardsIdNotificationsIdEndpoint: The initialized ServiceBoardsIdNotificationsIdEndpoint object. """ - child = ServiceBoardsIdNotificationsIdEndpoint(self.client, parent_endpoint=self) + child = ServiceBoardsIdNotificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardNotification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardNotification]: """ Performs a GET request against the /service/boards/{id}/notifications endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardNotification]: The parsed response data. """ - return self._parse_many(BoardNotification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardNotification, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardNotification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardNotification: """ Performs a POST request against the /service/boards/{id}/notifications endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardNotification: The parsed response data. """ - return self._parse_one(BoardNotification, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardNotification, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsIdEndpoint.py index 453f1795d..928dcb461 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdNotificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardNotification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardNotification: """ Performs a GET request against the /service/boards/{id}/notifications/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardNotification: The parsed response data. """ - return self._parse_one(BoardNotification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardNotification, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/notifications/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardNotification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardNotification: """ Performs a PUT request against the /service/boards/{id}/notifications/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardNotification: The parsed response data. """ - return self._parse_one(BoardNotification, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardNotification, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardNotification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardNotification: """ Performs a PATCH request against the /service/boards/{id}/notifications/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardNotification: The parsed response data. """ - return self._parse_one(BoardNotification, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardNotification, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesCountEndpoint.py index fbb0bf2a1..677d919f5 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdStatusesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/statuses/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/statuses/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesEndpoint.py index d0dffa043..bec2e0f33 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesCountEndpoint import ServiceBoardsIdStatusesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdEndpoint import ServiceBoardsIdStatusesIdEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesInfoEndpoint import ServiceBoardsIdStatusesInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesCountEndpoint import ( + ServiceBoardsIdStatusesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdEndpoint import ( + ServiceBoardsIdStatusesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesInfoEndpoint import ( + ServiceBoardsIdStatusesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ServiceBoardsIdStatusesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "statuses", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceBoardsIdStatusesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceBoardsIdStatusesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceBoardsIdStatusesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceBoardsIdStatusesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceBoardsIdStatusesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ServiceBoardsIdStatusesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardStatus]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardStatus]: """ Performs a GET request against the /service/boards/{id}/statuses endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardStatus]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardStatus]: """ Performs a GET request against the /service/boards/{id}/statuses endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardStatus]: The parsed response data. """ - return self._parse_many(BoardStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardStatus, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardStatus: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardStatus: """ Performs a POST request against the /service/boards/{id}/statuses endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardStatus: The parsed response data. """ - return self._parse_one(BoardStatus, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardStatus, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdEndpoint.py index 3a44dec3c..881e3a873 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdEndpoint.py @@ -1,11 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdInfoEndpoint import ServiceBoardsIdStatusesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdNotificationsEndpoint import \ - ServiceBoardsIdStatusesIdNotificationsEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdUsagesEndpoint import \ - ServiceBoardsIdStatusesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdInfoEndpoint import ( + ServiceBoardsIdStatusesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdNotificationsEndpoint import ( + ServiceBoardsIdStatusesIdNotificationsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdUsagesEndpoint import ( + ServiceBoardsIdStatusesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardStatus from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,15 +19,19 @@ class ServiceBoardsIdStatusesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceBoardsIdStatusesIdInfoEndpoint(client, parent_endpoint=self)) self.usages = self._register_child_endpoint( ServiceBoardsIdStatusesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ServiceBoardsIdStatusesIdInfoEndpoint(client, parent_endpoint=self) + ) self.notifications = self._register_child_endpoint( ServiceBoardsIdStatusesIdNotificationsEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardStatus]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardStatus]: """ Performs a GET request against the /service/boards/{id}/statuses/{id} endpoint and returns an initialized PaginatedResponse object. @@ -44,7 +52,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardStatus: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardStatus: """ Performs a GET request against the /service/boards/{id}/statuses/{id} endpoint. @@ -54,9 +64,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardStatus: The parsed response data. """ - return self._parse_one(BoardStatus, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardStatus, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/statuses/{id} endpoint. @@ -66,9 +80,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardStatus: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardStatus: """ Performs a PUT request against the /service/boards/{id}/statuses/{id} endpoint. @@ -78,9 +97,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardStatus: The parsed response data. """ - return self._parse_one(BoardStatus, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardStatus, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardStatus: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardStatus: """ Performs a PATCH request against the /service/boards/{id}/statuses/{id} endpoint. @@ -90,4 +113,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardStatus: The parsed response data. """ - return self._parse_one(BoardStatus, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardStatus, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdInfoEndpoint.py index 365dc4a71..c15d04f0c 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardStatusInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardStatusInfo: """ Performs a GET request against the /service/boards/{id}/statuses/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardStatusInfo: The parsed response data. """ - return self._parse_one(BoardStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsCountEndpoint.py index 975503714..7a63b8710 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdStatusesIdNotificationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/statuses/{id}/notifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/statuses/{id}/notifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsEndpoint.py index e3a5353c1..09c0ce2f0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdNotificationsCountEndpoint import \ - ServiceBoardsIdStatusesIdNotificationsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdNotificationsIdEndpoint import \ - ServiceBoardsIdStatusesIdNotificationsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdNotificationsCountEndpoint import ( + ServiceBoardsIdStatusesIdNotificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdNotificationsIdEndpoint import ( + ServiceBoardsIdStatusesIdNotificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardStatusNotification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "notifications", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ServiceBoardsIdStatusesIdNotificationsCountEndpoint(client, parent_endpoint=self) + ServiceBoardsIdStatusesIdNotificationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ServiceBoardsIdStatusesIdNotificationsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ServiceBoardsIdStatusesIdNotificationsIdEndpoint: Returns: ServiceBoardsIdStatusesIdNotificationsIdEndpoint: The initialized ServiceBoardsIdStatusesIdNotificationsIdEndpoint object. """ - child = ServiceBoardsIdStatusesIdNotificationsIdEndpoint(self.client, parent_endpoint=self) + child = ServiceBoardsIdStatusesIdNotificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardStatusNotification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardStatusNotification]: """ Performs a GET request against the /service/boards/{id}/statuses/{id}/notifications endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardStatusNotification]: The parsed response data. """ - return self._parse_many(BoardStatusNotification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardStatusNotification, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardStatusNotification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardStatusNotification: """ Performs a POST request against the /service/boards/{id}/statuses/{id}/notifications endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardStatusNotification: The parsed response data. """ - return self._parse_one(BoardStatusNotification, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardStatusNotification, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsIdEndpoint.py index 9397f5701..94b60daf9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdNotificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardStatusNotification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardStatusNotification: """ Performs a GET request against the /service/boards/{id}/statuses/{id}/notifications/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardStatusNotification: The parsed response data. """ - return self._parse_one(BoardStatusNotification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardStatusNotification, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/statuses/{id}/notifications/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardStatusNotification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardStatusNotification: """ Performs a PUT request against the /service/boards/{id}/statuses/{id}/notifications/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardStatusNotification: The parsed response data. """ - return self._parse_one(BoardStatusNotification, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardStatusNotification, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardStatusNotification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardStatusNotification: """ Performs a PATCH request against the /service/boards/{id}/statuses/{id}/notifications/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardStatusNotification: The parsed response data. """ - return self._parse_one(BoardStatusNotification, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardStatusNotification, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdUsagesEndpoint.py index 0b11d45cc..2bb0eadf0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdUsagesListEndpoint import \ - ServiceBoardsIdStatusesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesIdUsagesListEndpoint import ( + ServiceBoardsIdStatusesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ServiceBoardsIdStatusesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/statuses/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/statuses/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdUsagesListEndpoint.py index 6ee38fe80..770b5c92a 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdStatusesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/statuses/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/statuses/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesInfoCountEndpoint.py index f3b366d5f..287da4478 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdStatusesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/statuses/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/statuses/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesInfoEndpoint.py index 517bc075e..ef7b66fae 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdStatusesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesInfoCountEndpoint import \ - ServiceBoardsIdStatusesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdStatusesInfoCountEndpoint import ( + ServiceBoardsIdStatusesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardStatusInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardStatusInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardStatusInfo]: """ Performs a GET request against the /service/boards/{id}/statuses/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardStatusInfo]: The parsed response data. """ - return self._parse_many(BoardStatusInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardStatusInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesCountEndpoint.py index 53b566a32..363a2530b 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdSubtypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/subtypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/subtypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesEndpoint.py index 8a93309d9..f963fcb9e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesCountEndpoint import ServiceBoardsIdSubtypesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesIdEndpoint import ServiceBoardsIdSubtypesIdEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesInfoEndpoint import ServiceBoardsIdSubtypesInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesCountEndpoint import ( + ServiceBoardsIdSubtypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesIdEndpoint import ( + ServiceBoardsIdSubtypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesInfoEndpoint import ( + ServiceBoardsIdSubtypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardSubType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ServiceBoardsIdSubtypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "subtypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceBoardsIdSubtypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceBoardsIdSubtypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceBoardsIdSubtypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceBoardsIdSubtypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceBoardsIdSubtypesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardSubType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardSubType]: """ Performs a GET request against the /service/boards/{id}/subtypes endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardSubType]: The parsed response data. """ - return self._parse_many(BoardSubType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardSubType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardSubType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardSubType: """ Performs a POST request against the /service/boards/{id}/subtypes endpoint. @@ -74,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardSubType: The parsed response data. """ - return self._parse_one(BoardSubType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardSubType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdEndpoint.py index 3d0b1f7c7..1c0a2b6e0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesIdInfoEndpoint import ServiceBoardsIdSubtypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesIdUsagesEndpoint import \ - ServiceBoardsIdSubtypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesIdInfoEndpoint import ( + ServiceBoardsIdSubtypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesIdUsagesEndpoint import ( + ServiceBoardsIdSubtypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardSubType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +16,12 @@ class ServiceBoardsIdSubtypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceBoardsIdSubtypesIdInfoEndpoint(client, parent_endpoint=self)) self.usages = self._register_child_endpoint( ServiceBoardsIdSubtypesIdUsagesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + ServiceBoardsIdSubtypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -41,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardSubType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardSubType: """ Performs a GET request against the /service/boards/{id}/subtypes/{id} endpoint. @@ -51,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardSubType: The parsed response data. """ - return self._parse_one(BoardSubType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardSubType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/subtypes/{id} endpoint. @@ -63,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardSubType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardSubType: """ Performs a PUT request against the /service/boards/{id}/subtypes/{id} endpoint. @@ -75,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardSubType: The parsed response data. """ - return self._parse_one(BoardSubType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardSubType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardSubType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardSubType: """ Performs a PATCH request against the /service/boards/{id}/subtypes/{id} endpoint. @@ -87,4 +107,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardSubType: The parsed response data. """ - return self._parse_one(BoardSubType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardSubType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdInfoEndpoint.py index d0551c7fd..ba7505ad5 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardSubTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardSubTypeInfo: """ Performs a GET request against the /service/boards/{id}/subtypes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardSubTypeInfo: The parsed response data. """ - return self._parse_one(BoardSubTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardSubTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdUsagesEndpoint.py index a64927b14..aa20d3711 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesIdUsagesListEndpoint import \ - ServiceBoardsIdSubtypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesIdUsagesListEndpoint import ( + ServiceBoardsIdSubtypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ServiceBoardsIdSubtypesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/subtypes/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/subtypes/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdUsagesListEndpoint.py index d81a6592c..68f9d244b 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdSubtypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/subtypes/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/subtypes/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesInfoCountEndpoint.py index d520b925e..52694f660 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdSubtypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/subtypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/subtypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesInfoEndpoint.py index 4cd566941..4a0218629 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdSubtypesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesInfoCountEndpoint import \ - ServiceBoardsIdSubtypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdSubtypesInfoCountEndpoint import ( + ServiceBoardsIdSubtypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardSubTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardSubTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardSubTypeInfo]: """ Performs a GET request against the /service/boards/{id}/subtypes/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardSubTypeInfo]: The parsed response data. """ - return self._parse_many(BoardSubTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardSubTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsCountEndpoint.py index e8c77510b..ed0409ea0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdTeamsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/teams/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/teams/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsEndpoint.py index 136dddb9e..ee1a872ed 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsCountEndpoint import ServiceBoardsIdTeamsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsIdEndpoint import ServiceBoardsIdTeamsIdEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsInfoEndpoint import ServiceBoardsIdTeamsInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsCountEndpoint import ( + ServiceBoardsIdTeamsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsIdEndpoint import ( + ServiceBoardsIdTeamsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsInfoEndpoint import ( + ServiceBoardsIdTeamsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardTeam from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ServiceBoardsIdTeamsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "teams", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceBoardsIdTeamsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceBoardsIdTeamsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceBoardsIdTeamsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceBoardsIdTeamsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceBoardsIdTeamsIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ServiceBoardsIdTeamsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardTeam]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardTeam]: """ Performs a GET request against the /service/boards/{id}/teams endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardTeam]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardTeam]: """ Performs a GET request against the /service/boards/{id}/teams endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardTeam]: The parsed response data. """ - return self._parse_many(BoardTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardTeam, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardTeam: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardTeam: """ Performs a POST request against the /service/boards/{id}/teams endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardTeam: The parsed response data. """ - return self._parse_one(BoardTeam, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardTeam, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdEndpoint.py index a298c9ac3..31745d47c 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsIdInfoEndpoint import ServiceBoardsIdTeamsIdInfoEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsIdUsagesEndpoint import ServiceBoardsIdTeamsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsIdInfoEndpoint import ( + ServiceBoardsIdTeamsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsIdUsagesEndpoint import ( + ServiceBoardsIdTeamsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardTeam from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class ServiceBoardsIdTeamsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceBoardsIdTeamsIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ServiceBoardsIdTeamsIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ServiceBoardsIdTeamsIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceBoardsIdTeamsIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardTeam]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardTeam]: """ Performs a GET request against the /service/boards/{id}/teams/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardTeam: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardTeam: """ Performs a GET request against the /service/boards/{id}/teams/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardTeam: The parsed response data. """ - return self._parse_one(BoardTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardTeam, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/teams/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardTeam: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardTeam: """ Performs a PUT request against the /service/boards/{id}/teams/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardTeam: The parsed response data. """ - return self._parse_one(BoardTeam, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardTeam, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardTeam: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardTeam: """ Performs a PATCH request against the /service/boards/{id}/teams/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardTeam: The parsed response data. """ - return self._parse_one(BoardTeam, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardTeam, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdInfoEndpoint.py index f8eeb321c..a18fe4f8e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardTeamInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardTeamInfo: """ Performs a GET request against the /service/boards/{id}/teams/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardTeamInfo: The parsed response data. """ - return self._parse_one(BoardTeamInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardTeamInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdUsagesEndpoint.py index 73689815c..3fe3b7673 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsIdUsagesListEndpoint import \ - ServiceBoardsIdTeamsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsIdUsagesListEndpoint import ( + ServiceBoardsIdTeamsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdUsagesListEndpoint.py index 7c9f96619..6d97438ce 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdTeamsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/teams/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/teams/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsInfoCountEndpoint.py index 03a2c5f50..a1d4678ab 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdTeamsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/teams/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/teams/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsInfoEndpoint.py index f1bdd9f5e..44ce5cfbf 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTeamsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsInfoCountEndpoint import ServiceBoardsIdTeamsInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdTeamsInfoCountEndpoint import ( + ServiceBoardsIdTeamsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardTeamInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceBoardsIdTeamsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceBoardsIdTeamsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceBoardsIdTeamsInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardTeamInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardTeamInfo]: """ Performs a GET request against the /service/boards/{id}/teams/info endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardTeamInfo]: The parsed response data. """ - return self._parse_many(BoardTeamInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardTeamInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsCountEndpoint.py index 91cb1a770..b9f26de48 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdTypesubtypeitemassociationsCountEndpoint(ConnectWiseEndpoin def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/typeSubTypeItemAssociations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/typeSubTypeItemAssociations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsEndpoint.py index a5fdc713d..4aed58598 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesubtypeitemassociationsCountEndpoint import \ - ServiceBoardsIdTypesubtypeitemassociationsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint import \ - ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesubtypeitemassociationsCountEndpoint import ( + ServiceBoardsIdTypesubtypeitemassociationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint import ( + ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardTypeSubTypeItemAssociation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class ServiceBoardsIdTypesubtypeitemassociationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "typeSubTypeItemAssociations", parent_endpoint=parent_endpoint) + super().__init__( + client, "typeSubTypeItemAssociations", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - ServiceBoardsIdTypesubtypeitemassociationsCountEndpoint(client, parent_endpoint=self) + ServiceBoardsIdTypesubtypeitemassociationsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint: Returns: ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint: The initialized ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint object. """ - child = ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint(self.client, parent_endpoint=self) + child = ServiceBoardsIdTypesubtypeitemassociationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,5 +75,6 @@ def get( list[BoardTypeSubTypeItemAssociation]: The parsed response data. """ return self._parse_many( - BoardTypeSubTypeItemAssociation, super()._make_request("GET", data=data, params=params).json() + BoardTypeSubTypeItemAssociation, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsIdEndpoint.py index 59825f1aa..ab80cd6e1 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypeSubTypeItemAssociationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardTypeSubTypeItemAssociation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardTypeSubTypeItemAssociation: """ Performs a GET request against the /service/boards/{id}/typeSubTypeItemAssociations/{id} endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B BoardTypeSubTypeItemAssociation: The parsed response data. """ return self._parse_one( - BoardTypeSubTypeItemAssociation, super()._make_request("GET", data=data, params=params).json() + BoardTypeSubTypeItemAssociation, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesCountEndpoint.py index 502bb9167..bd785d399 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/boards/{id}/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/boards/{id}/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesEndpoint.py index 174fc19b2..8ba6847b0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesCountEndpoint import ServiceBoardsIdTypesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesIdEndpoint import ServiceBoardsIdTypesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesCountEndpoint import ( + ServiceBoardsIdTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesIdEndpoint import ( + ServiceBoardsIdTypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceBoardsIdTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceBoardsIdTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceBoardsIdTypesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceBoardsIdTypesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceBoardsIdTypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardType]: """ Performs a GET request against the /service/boards/{id}/types endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardType]: """ Performs a GET request against the /service/boards/{id}/types endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardType]: The parsed response data. """ - return self._parse_many(BoardType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardType: """ Performs a POST request against the /service/boards/{id}/types endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardType: The parsed response data. """ - return self._parse_one(BoardType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BoardType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdEndpoint.py index 56b9de5ea..3beba5bd0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesIdUsagesEndpoint import ServiceBoardsIdTypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesIdUsagesEndpoint import ( + ServiceBoardsIdTypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ServiceBoardsIdTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.usages = self._register_child_endpoint(ServiceBoardsIdTypesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ServiceBoardsIdTypesIdUsagesEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardType]: """ Performs a GET request against the /service/boards/{id}/types/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardType: """ Performs a GET request against the /service/boards/{id}/types/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardType: The parsed response data. """ - return self._parse_one(BoardType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/boards/{id}/types/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardType: """ Performs a PUT request against the /service/boards/{id}/types/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardType: The parsed response data. """ - return self._parse_one(BoardType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BoardType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardType: """ Performs a PATCH request against the /service/boards/{id}/types/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BoardType: The parsed response data. """ - return self._parse_one(BoardType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + BoardType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdUsagesEndpoint.py index d31676728..4bcb0787e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesIdUsagesListEndpoint import \ - ServiceBoardsIdTypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdTypesIdUsagesListEndpoint import ( + ServiceBoardsIdTypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ServiceBoardsIdTypesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/types/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/types/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdUsagesListEndpoint.py index c7112c93c..df14904f6 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdTypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/types/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/types/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdUsagesEndpoint.py index fa0a561ee..cfe1e907e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceBoardsIdUsagesListEndpoint import ServiceBoardsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceBoardsIdUsagesListEndpoint import ( + ServiceBoardsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ServiceBoardsIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ServiceBoardsIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ServiceBoardsIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdUsagesListEndpoint.py index de14a79da..8716e942e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceBoardsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceBoardsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceBoardsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/boards/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/boards/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceCodesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceCodesCountEndpoint.py index 1433bf950..12be554a6 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceCodesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceCodesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceCodesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/codes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/codes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceCodesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceCodesEndpoint.py index a5b34fe2c..a387c3719 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceCodesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceCodesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceCodesCountEndpoint import ServiceCodesCountEndpoint +from pyconnectwise.endpoints.manage.ServiceCodesCountEndpoint import ( + ServiceCodesCountEndpoint, +) from pyconnectwise.endpoints.manage.ServiceCodesIdEndpoint import ServiceCodesIdEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Code @@ -12,7 +14,9 @@ class ServiceCodesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "codes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceCodesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceCodesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceCodesIdEndpoint: """ @@ -27,7 +31,9 @@ def id(self, id: int) -> ServiceCodesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Code]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Code]: """ Performs a GET request against the /service/codes endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +54,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Code]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Code]: """ Performs a GET request against the /service/codes endpoint. @@ -58,9 +66,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Code]: The parsed response data. """ - return self._parse_many(Code, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Code, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Code: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Code: """ Performs a POST request against the /service/codes endpoint. @@ -70,4 +82,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Code: The parsed response data. """ - return self._parse_one(Code, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Code, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceCodesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceCodesIdEndpoint.py index 3dd7719fe..0f7f5a572 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceCodesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceCodesIdEndpoint.py @@ -10,7 +10,9 @@ class ServiceCodesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Code]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Code]: """ Performs a GET request against the /service/codes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -41,9 +43,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Code: The parsed response data. """ - return self._parse_one(Code, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Code, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/codes/{id} endpoint. @@ -53,7 +59,10 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Code: """ @@ -65,9 +74,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Code: The parsed response data. """ - return self._parse_one(Code, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Code, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Code: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Code: """ Performs a PATCH request against the /service/codes/{id} endpoint. @@ -77,4 +90,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Code: The parsed response data. """ - return self._parse_one(Code, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Code, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesCountEndpoint.py index 4acc73d0b..30ecfbcbc 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceEmailtemplatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/emailTemplates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/emailTemplates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesEndpoint.py index 72bc5a21b..1e5ca75fb 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceEmailtemplatesCountEndpoint import ServiceEmailtemplatesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceEmailtemplatesIdEndpoint import ServiceEmailtemplatesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceEmailtemplatesCountEndpoint import ( + ServiceEmailtemplatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceEmailtemplatesIdEndpoint import ( + ServiceEmailtemplatesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceEmailTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceEmailtemplatesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "emailTemplates", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceEmailtemplatesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceEmailtemplatesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceEmailtemplatesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceEmailTemplate]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceEmailTemplate]: """ Performs a GET request against the /service/emailTemplates endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceEmailTemplate]: The parsed response data. """ - return self._parse_many(ServiceEmailTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceEmailTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceEmailTemplate: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceEmailTemplate: """ Performs a POST request against the /service/emailTemplates endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceEmailTemplate: The parsed response data. """ - return self._parse_one(ServiceEmailTemplate, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ServiceEmailTemplate, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdEndpoint.py index ad0a63d93..bdbd8a2f1 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceEmailtemplatesIdUsagesEndpoint import ServiceEmailtemplatesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceEmailtemplatesIdUsagesEndpoint import ( + ServiceEmailtemplatesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceEmailTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceEmailtemplatesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.usages = self._register_child_endpoint(ServiceEmailtemplatesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ServiceEmailtemplatesIdUsagesEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceEmailTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceEmailTemplate: """ Performs a GET request against the /service/emailTemplates/{id} endpoint. @@ -46,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceEmailTemplate: The parsed response data. """ - return self._parse_one(ServiceEmailTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceEmailTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/emailTemplates/{id} endpoint. @@ -58,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceEmailTemplate: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceEmailTemplate: """ Performs a PUT request against the /service/emailTemplates/{id} endpoint. @@ -70,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceEmailTemplate: The parsed response data. """ - return self._parse_one(ServiceEmailTemplate, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ServiceEmailTemplate, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceEmailTemplate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceEmailTemplate: """ Performs a PATCH request against the /service/emailTemplates/{id} endpoint. @@ -82,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceEmailTemplate: The parsed response data. """ - return self._parse_one(ServiceEmailTemplate, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ServiceEmailTemplate, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdUsagesEndpoint.py index c59857192..df270f334 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceEmailtemplatesIdUsagesListEndpoint import \ - ServiceEmailtemplatesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceEmailtemplatesIdUsagesListEndpoint import ( + ServiceEmailtemplatesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ServiceEmailtemplatesIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/emailTemplates/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/emailTemplates/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdUsagesListEndpoint.py index 46f9e90eb..5f6fc4732 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceEmailTemplatesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceEmailtemplatesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/emailTemplates/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/emailTemplates/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceEndpoint.py index e5d5c309f..2d0c28d08 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceEndpoint.py @@ -3,29 +3,58 @@ from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.endpoints.manage.ServiceBoardsEndpoint import ServiceBoardsEndpoint from pyconnectwise.endpoints.manage.ServiceCodesEndpoint import ServiceCodesEndpoint -from pyconnectwise.endpoints.manage.ServiceEmailtemplatesEndpoint import ServiceEmailtemplatesEndpoint +from pyconnectwise.endpoints.manage.ServiceEmailtemplatesEndpoint import ( + ServiceEmailtemplatesEndpoint, +) from pyconnectwise.endpoints.manage.ServiceImpactsEndpoint import ServiceImpactsEndpoint from pyconnectwise.endpoints.manage.ServiceInfoEndpoint import ServiceInfoEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasearticlesEndpoint import ServiceKnowledgebasearticlesEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasecategoriesEndpoint import ServiceKnowledgebasecategoriesEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasesettingsEndpoint import ServiceKnowledgebasesettingsEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesEndpoint import \ - ServiceKnowledgebasesubcategoriesEndpoint -from pyconnectwise.endpoints.manage.ServiceLocationsEndpoint import ServiceLocationsEndpoint -from pyconnectwise.endpoints.manage.ServicePrioritiesEndpoint import ServicePrioritiesEndpoint -from pyconnectwise.endpoints.manage.ServicePriorityEndpoint import ServicePriorityEndpoint -from pyconnectwise.endpoints.manage.ServiceSchedulingEndpoint import ServiceSchedulingEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffEndpoint import ServiceServicesignoffEndpoint -from pyconnectwise.endpoints.manage.ServiceSeveritiesEndpoint import ServiceSeveritiesEndpoint +from pyconnectwise.endpoints.manage.ServiceKnowledgebasearticlesEndpoint import ( + ServiceKnowledgebasearticlesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceKnowledgebasecategoriesEndpoint import ( + ServiceKnowledgebasecategoriesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceKnowledgebasesettingsEndpoint import ( + ServiceKnowledgebasesettingsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesEndpoint import ( + ServiceKnowledgebasesubcategoriesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceLocationsEndpoint import ( + ServiceLocationsEndpoint, +) +from pyconnectwise.endpoints.manage.ServicePrioritiesEndpoint import ( + ServicePrioritiesEndpoint, +) +from pyconnectwise.endpoints.manage.ServicePriorityEndpoint import ( + ServicePriorityEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSchedulingEndpoint import ( + ServiceSchedulingEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceServicesignoffEndpoint import ( + ServiceServicesignoffEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSeveritiesEndpoint import ( + ServiceSeveritiesEndpoint, +) from pyconnectwise.endpoints.manage.ServiceSlasEndpoint import ServiceSlasEndpoint from pyconnectwise.endpoints.manage.ServiceSourcesEndpoint import ServiceSourcesEndpoint from pyconnectwise.endpoints.manage.ServiceSurveysEndpoint import ServiceSurveysEndpoint -from pyconnectwise.endpoints.manage.ServiceTeammembersEndpoint import ServiceTeammembersEndpoint +from pyconnectwise.endpoints.manage.ServiceTeammembersEndpoint import ( + ServiceTeammembersEndpoint, +) from pyconnectwise.endpoints.manage.ServiceTeamsEndpoint import ServiceTeamsEndpoint -from pyconnectwise.endpoints.manage.ServiceTemplatesEndpoint import ServiceTemplatesEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketlinksEndpoint import ServiceTicketlinksEndpoint +from pyconnectwise.endpoints.manage.ServiceTemplatesEndpoint import ( + ServiceTemplatesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketlinksEndpoint import ( + ServiceTicketlinksEndpoint, +) from pyconnectwise.endpoints.manage.ServiceTicketsEndpoint import ServiceTicketsEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsyncsEndpoint import ServiceTicketsyncsEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsyncsEndpoint import ( + ServiceTicketsyncsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -34,40 +63,78 @@ class ServiceEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "service", parent_endpoint=parent_endpoint) - self.teams = self._register_child_endpoint(ServiceTeamsEndpoint(client, parent_endpoint=self)) - self.templates = self._register_child_endpoint(ServiceTemplatesEndpoint(client, parent_endpoint=self)) - self.email_templates = self._register_child_endpoint( - ServiceEmailtemplatesEndpoint(client, parent_endpoint=self) + self.severities = self._register_child_endpoint( + ServiceSeveritiesEndpoint(client, parent_endpoint=self) ) - self.priorities = self._register_child_endpoint(ServicePrioritiesEndpoint(client, parent_endpoint=self)) - self.s_l_as = self._register_child_endpoint(ServiceSlasEndpoint(client, parent_endpoint=self)) - self.info = self._register_child_endpoint(ServiceInfoEndpoint(client, parent_endpoint=self)) self.knowledgebasesettings = self._register_child_endpoint( ServiceKnowledgebasesettingsEndpoint(client, parent_endpoint=self) ) - self.impacts = self._register_child_endpoint(ServiceImpactsEndpoint(client, parent_endpoint=self)) self.knowledge_base_sub_categories = self._register_child_endpoint( ServiceKnowledgebasesubcategoriesEndpoint(client, parent_endpoint=self) ) - self.tickets = self._register_child_endpoint(ServiceTicketsEndpoint(client, parent_endpoint=self)) self.service_signoff = self._register_child_endpoint( ServiceServicesignoffEndpoint(client, parent_endpoint=self) ) - self.knowledge_base_categories = self._register_child_endpoint( - ServiceKnowledgebasecategoriesEndpoint(client, parent_endpoint=self) + self.priority = self._register_child_endpoint( + ServicePriorityEndpoint(client, parent_endpoint=self) + ) + self.s_l_as = self._register_child_endpoint( + ServiceSlasEndpoint(client, parent_endpoint=self) ) - self.severities = self._register_child_endpoint(ServiceSeveritiesEndpoint(client, parent_endpoint=self)) - self.codes = self._register_child_endpoint(ServiceCodesEndpoint(client, parent_endpoint=self)) self.knowledge_base_articles = self._register_child_endpoint( ServiceKnowledgebasearticlesEndpoint(client, parent_endpoint=self) ) - self.ticket_links = self._register_child_endpoint(ServiceTicketlinksEndpoint(client, parent_endpoint=self)) - self.sources = self._register_child_endpoint(ServiceSourcesEndpoint(client, parent_endpoint=self)) - self.slas = self._register_child_endpoint(ServiceSlasEndpoint(client, parent_endpoint=self)) - self.locations = self._register_child_endpoint(ServiceLocationsEndpoint(client, parent_endpoint=self)) - self.scheduling = self._register_child_endpoint(ServiceSchedulingEndpoint(client, parent_endpoint=self)) - self.priority = self._register_child_endpoint(ServicePriorityEndpoint(client, parent_endpoint=self)) - self.surveys = self._register_child_endpoint(ServiceSurveysEndpoint(client, parent_endpoint=self)) - self.team_members = self._register_child_endpoint(ServiceTeammembersEndpoint(client, parent_endpoint=self)) - self.ticket_syncs = self._register_child_endpoint(ServiceTicketsyncsEndpoint(client, parent_endpoint=self)) - self.boards = self._register_child_endpoint(ServiceBoardsEndpoint(client, parent_endpoint=self)) + self.templates = self._register_child_endpoint( + ServiceTemplatesEndpoint(client, parent_endpoint=self) + ) + self.boards = self._register_child_endpoint( + ServiceBoardsEndpoint(client, parent_endpoint=self) + ) + self.ticket_syncs = self._register_child_endpoint( + ServiceTicketsyncsEndpoint(client, parent_endpoint=self) + ) + self.impacts = self._register_child_endpoint( + ServiceImpactsEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceInfoEndpoint(client, parent_endpoint=self) + ) + self.scheduling = self._register_child_endpoint( + ServiceSchedulingEndpoint(client, parent_endpoint=self) + ) + self.teams = self._register_child_endpoint( + ServiceTeamsEndpoint(client, parent_endpoint=self) + ) + self.ticket_links = self._register_child_endpoint( + ServiceTicketlinksEndpoint(client, parent_endpoint=self) + ) + self.knowledge_base_categories = self._register_child_endpoint( + ServiceKnowledgebasecategoriesEndpoint(client, parent_endpoint=self) + ) + self.tickets = self._register_child_endpoint( + ServiceTicketsEndpoint(client, parent_endpoint=self) + ) + self.locations = self._register_child_endpoint( + ServiceLocationsEndpoint(client, parent_endpoint=self) + ) + self.sources = self._register_child_endpoint( + ServiceSourcesEndpoint(client, parent_endpoint=self) + ) + self.email_templates = self._register_child_endpoint( + ServiceEmailtemplatesEndpoint(client, parent_endpoint=self) + ) + self.slas = self._register_child_endpoint( + ServiceSlasEndpoint(client, parent_endpoint=self) + ) + self.priorities = self._register_child_endpoint( + ServicePrioritiesEndpoint(client, parent_endpoint=self) + ) + self.codes = self._register_child_endpoint( + ServiceCodesEndpoint(client, parent_endpoint=self) + ) + self.team_members = self._register_child_endpoint( + ServiceTeammembersEndpoint(client, parent_endpoint=self) + ) + self.surveys = self._register_child_endpoint( + ServiceSurveysEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceImpactsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceImpactsCountEndpoint.py index d8029f682..cc371292c 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceImpactsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceImpactsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceImpactsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/impacts/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/impacts/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceImpactsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceImpactsEndpoint.py index c0c07757e..c64147315 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceImpactsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceImpactsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceImpactsCountEndpoint import ServiceImpactsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceImpactsIdEndpoint import ServiceImpactsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceImpactsCountEndpoint import ( + ServiceImpactsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceImpactsIdEndpoint import ( + ServiceImpactsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Impact from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceImpactsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "impacts", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceImpactsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceImpactsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceImpactsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceImpactsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Impact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Impact]: """ Performs a GET request against the /service/impacts endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Impact]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Impact]: """ Performs a GET request against the /service/impacts endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Impact]: The parsed response data. """ - return self._parse_many(Impact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Impact, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceImpactsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceImpactsIdEndpoint.py index fc67de480..3f0ea23f7 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceImpactsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceImpactsIdEndpoint.py @@ -10,7 +10,9 @@ class ServiceImpactsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Impact]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Impact]: """ Performs a GET request against the /service/impacts/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Impact: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Impact: """ Performs a GET request against the /service/impacts/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: Impact: The parsed response data. """ - return self._parse_one(Impact, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Impact, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Impact: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Impact: """ Performs a PUT request against the /service/impacts/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: Impact: The parsed response data. """ - return self._parse_one(Impact, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Impact, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Impact: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Impact: """ Performs a PATCH request against the /service/impacts/{id} endpoint. @@ -65,4 +77,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Impact: The parsed response data. """ - return self._parse_one(Impact, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Impact, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsCountEndpoint.py index 6ace82a22..a5f831822 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceInfoBoardsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/info/boards/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/info/boards/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsEndpoint.py index 42a1bccdb..5e370c1dd 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceInfoBoardsCountEndpoint import ServiceInfoBoardsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceInfoBoardsIdEndpoint import ServiceInfoBoardsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceInfoBoardsCountEndpoint import ( + ServiceInfoBoardsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceInfoBoardsIdEndpoint import ( + ServiceInfoBoardsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceInfoBoardsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "boards", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceInfoBoardsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceInfoBoardsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceInfoBoardsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceInfoBoardsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardInfo]: """ Performs a GET request against the /service/info/boards endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardInfo]: """ Performs a GET request against the /service/info/boards endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardInfo]: The parsed response data. """ - return self._parse_many(BoardInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsIdEndpoint.py index 574aa49f6..6d2f069b0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardsIdEndpoint.py @@ -10,7 +10,9 @@ class ServiceInfoBoardsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[BoardInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[BoardInfo]: """ Performs a GET request against the /service/info/boards/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardInfo: """ Performs a GET request against the /service/info/boards/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardInfo: The parsed response data. """ - return self._parse_one(BoardInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesCountEndpoint.py index 46bf4a68e..521901c4e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceInfoBoardtypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/info/boardtypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/info/boardtypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesEndpoint.py index 1fbb03158..12d5808a6 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceInfoBoardtypesCountEndpoint import ServiceInfoBoardtypesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceInfoBoardtypesIdEndpoint import ServiceInfoBoardtypesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceInfoBoardtypesCountEndpoint import ( + ServiceInfoBoardtypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceInfoBoardtypesIdEndpoint import ( + ServiceInfoBoardtypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BoardTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceInfoBoardtypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "boardtypes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceInfoBoardtypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceInfoBoardtypesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceInfoBoardtypesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[BoardTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[BoardTypeInfo]: """ Performs a GET request against the /service/info/boardtypes endpoint. @@ -60,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[BoardTypeInfo]: The parsed response data. """ - return self._parse_many(BoardTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + BoardTypeInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesIdEndpoint.py index fb3a42607..36ff34111 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceInfoBoardtypesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BoardTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BoardTypeInfo: """ Performs a GET request against the /service/info/boardtypes/{id} endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BoardTypeInfo: The parsed response data. """ - return self._parse_one(BoardTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + BoardTypeInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceInfoEndpoint.py index 676ed5d6f..452cb97c6 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceInfoEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceInfoBoardsEndpoint import ServiceInfoBoardsEndpoint -from pyconnectwise.endpoints.manage.ServiceInfoBoardtypesEndpoint import ServiceInfoBoardtypesEndpoint +from pyconnectwise.endpoints.manage.ServiceInfoBoardsEndpoint import ( + ServiceInfoBoardsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceInfoBoardtypesEndpoint import ( + ServiceInfoBoardtypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,5 +15,9 @@ class ServiceInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.boardtypes = self._register_child_endpoint(ServiceInfoBoardtypesEndpoint(client, parent_endpoint=self)) - self.boards = self._register_child_endpoint(ServiceInfoBoardsEndpoint(client, parent_endpoint=self)) + self.boards = self._register_child_endpoint( + ServiceInfoBoardsEndpoint(client, parent_endpoint=self) + ) + self.boardtypes = self._register_child_endpoint( + ServiceInfoBoardtypesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesCountEndpoint.py index 0908c9598..aac68476e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceKnowledgebasearticlesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/knowledgeBaseArticles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/knowledgeBaseArticles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesEndpoint.py index 52916f269..6c46d6a03 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasearticlesCountEndpoint import \ - ServiceKnowledgebasearticlesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasearticlesIdEndpoint import ServiceKnowledgebasearticlesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceKnowledgebasearticlesCountEndpoint import ( + ServiceKnowledgebasearticlesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceKnowledgebasearticlesIdEndpoint import ( + ServiceKnowledgebasearticlesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import KnowledgeBaseArticle from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +14,9 @@ class ServiceKnowledgebasearticlesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "knowledgeBaseArticles", parent_endpoint=parent_endpoint) + super().__init__( + client, "knowledgeBaseArticles", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( ServiceKnowledgebasearticlesCountEndpoint(client, parent_endpoint=self) @@ -26,7 +31,9 @@ def id(self, id: int) -> ServiceKnowledgebasearticlesIdEndpoint: Returns: ServiceKnowledgebasearticlesIdEndpoint: The initialized ServiceKnowledgebasearticlesIdEndpoint object. """ - child = ServiceKnowledgebasearticlesIdEndpoint(self.client, parent_endpoint=self) + child = ServiceKnowledgebasearticlesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[KnowledgeBaseArticle]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[KnowledgeBaseArticle]: """ Performs a GET request against the /service/knowledgeBaseArticles endpoint. @@ -63,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[KnowledgeBaseArticle]: The parsed response data. """ - return self._parse_many(KnowledgeBaseArticle, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + KnowledgeBaseArticle, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseArticle: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseArticle: """ Performs a POST request against the /service/knowledgeBaseArticles endpoint. @@ -75,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: KnowledgeBaseArticle: The parsed response data. """ - return self._parse_one(KnowledgeBaseArticle, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseArticle, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesIdEndpoint.py index 076327dc6..7d230059e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseArticlesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseArticle: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseArticle: """ Performs a GET request against the /service/knowledgeBaseArticles/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KnowledgeBaseArticle: The parsed response data. """ - return self._parse_one(KnowledgeBaseArticle, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseArticle, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/knowledgeBaseArticles/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseArticle: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseArticle: """ Performs a PUT request against the /service/knowledgeBaseArticles/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KnowledgeBaseArticle: The parsed response data. """ - return self._parse_one(KnowledgeBaseArticle, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseArticle, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseArticle: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseArticle: """ Performs a PATCH request against the /service/knowledgeBaseArticles/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: KnowledgeBaseArticle: The parsed response data. """ - return self._parse_one(KnowledgeBaseArticle, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseArticle, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesCountEndpoint.py index c6db30d9a..da51d6a7b 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceKnowledgebasecategoriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/knowledgeBaseCategories/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/knowledgeBaseCategories/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesEndpoint.py index a4f7184b3..6ef58e8c7 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasecategoriesCountEndpoint import \ - ServiceKnowledgebasecategoriesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasecategoriesIdEndpoint import \ - ServiceKnowledgebasecategoriesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceKnowledgebasecategoriesCountEndpoint import ( + ServiceKnowledgebasecategoriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceKnowledgebasecategoriesIdEndpoint import ( + ServiceKnowledgebasecategoriesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import KnowledgeBaseCategory from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class ServiceKnowledgebasecategoriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "knowledgeBaseCategories", parent_endpoint=parent_endpoint) + super().__init__( + client, "knowledgeBaseCategories", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( ServiceKnowledgebasecategoriesCountEndpoint(client, parent_endpoint=self) @@ -27,7 +31,9 @@ def id(self, id: int) -> ServiceKnowledgebasecategoriesIdEndpoint: Returns: ServiceKnowledgebasecategoriesIdEndpoint: The initialized ServiceKnowledgebasecategoriesIdEndpoint object. """ - child = ServiceKnowledgebasecategoriesIdEndpoint(self.client, parent_endpoint=self) + child = ServiceKnowledgebasecategoriesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[KnowledgeBaseCategory]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[KnowledgeBaseCategory]: """ Performs a GET request against the /service/knowledgeBaseCategories endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[KnowledgeBaseCategory]: The parsed response data. """ - return self._parse_many(KnowledgeBaseCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + KnowledgeBaseCategory, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseCategory: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseCategory: """ Performs a POST request against the /service/knowledgeBaseCategories endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: KnowledgeBaseCategory: The parsed response data. """ - return self._parse_one(KnowledgeBaseCategory, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseCategory, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesIdEndpoint.py index f30d09dfc..01fd84135 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseCategoriesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseCategory: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseCategory: """ Performs a GET request against the /service/knowledgeBaseCategories/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KnowledgeBaseCategory: The parsed response data. """ - return self._parse_one(KnowledgeBaseCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseCategory, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/knowledgeBaseCategories/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseCategory: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseCategory: """ Performs a PUT request against the /service/knowledgeBaseCategories/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KnowledgeBaseCategory: The parsed response data. """ - return self._parse_one(KnowledgeBaseCategory, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseCategory, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseCategory: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseCategory: """ Performs a PATCH request against the /service/knowledgeBaseCategories/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: KnowledgeBaseCategory: The parsed response data. """ - return self._parse_one(KnowledgeBaseCategory, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseCategory, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesCountEndpoint.py index fb6b8b9dd..3cad51f80 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceKnowledgebasesubcategoriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/knowledgeBaseSubCategories/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/knowledgeBaseSubCategories/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesEndpoint.py index f0c26bf35..77fc4c2ef 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesCountEndpoint import \ - ServiceKnowledgebasesubcategoriesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesIdEndpoint import \ - ServiceKnowledgebasesubcategoriesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesCountEndpoint import ( + ServiceKnowledgebasesubcategoriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesIdEndpoint import ( + ServiceKnowledgebasesubcategoriesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import KnowledgeBaseSubCategory from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class ServiceKnowledgebasesubcategoriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "knowledgeBaseSubCategories", parent_endpoint=parent_endpoint) + super().__init__( + client, "knowledgeBaseSubCategories", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( ServiceKnowledgebasesubcategoriesCountEndpoint(client, parent_endpoint=self) @@ -27,7 +31,9 @@ def id(self, id: int) -> ServiceKnowledgebasesubcategoriesIdEndpoint: Returns: ServiceKnowledgebasesubcategoriesIdEndpoint: The initialized ServiceKnowledgebasesubcategoriesIdEndpoint object. """ - child = ServiceKnowledgebasesubcategoriesIdEndpoint(self.client, parent_endpoint=self) + child = ServiceKnowledgebasesubcategoriesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[KnowledgeBaseSubCategory]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[KnowledgeBaseSubCategory]: """ Performs a GET request against the /service/knowledgeBaseSubCategories endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[KnowledgeBaseSubCategory]: The parsed response data. """ - return self._parse_many(KnowledgeBaseSubCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + KnowledgeBaseSubCategory, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSubCategory: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseSubCategory: """ Performs a POST request against the /service/knowledgeBaseSubCategories endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: KnowledgeBaseSubCategory: The parsed response data. """ - return self._parse_one(KnowledgeBaseSubCategory, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseSubCategory, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdEndpoint.py index ef882caf2..e2e114e7f 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesIdUsagesEndpoint import \ - ServiceKnowledgebasesubcategoriesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesIdUsagesEndpoint import ( + ServiceKnowledgebasesubcategoriesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import KnowledgeBaseSubCategory from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.usages = self._register_child_endpoint( - ServiceKnowledgebasesubcategoriesIdUsagesEndpoint(client, parent_endpoint=self) + ServiceKnowledgebasesubcategoriesIdUsagesEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSubCategory: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseSubCategory: """ Performs a GET request against the /service/knowledgeBaseSubCategories/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KnowledgeBaseSubCategory: The parsed response data. """ - return self._parse_one(KnowledgeBaseSubCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseSubCategory, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/knowledgeBaseSubCategories/{id} endpoint. @@ -61,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSubCategory: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseSubCategory: """ Performs a PUT request against the /service/knowledgeBaseSubCategories/{id} endpoint. @@ -73,9 +88,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KnowledgeBaseSubCategory: The parsed response data. """ - return self._parse_one(KnowledgeBaseSubCategory, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseSubCategory, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSubCategory: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseSubCategory: """ Performs a PATCH request against the /service/knowledgeBaseSubCategories/{id} endpoint. @@ -86,5 +106,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSubCategory: The parsed response data. """ return self._parse_one( - KnowledgeBaseSubCategory, super()._make_request("PATCH", data=data, params=params).json() + KnowledgeBaseSubCategory, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdUsagesEndpoint.py index b6bb31cf3..df97c6461 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesIdUsagesListEndpoint import \ - ServiceKnowledgebasesubcategoriesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceKnowledgebasesubcategoriesIdUsagesListEndpoint import ( + ServiceKnowledgebasesubcategoriesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +14,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) self.list = self._register_child_endpoint( - ServiceKnowledgebasesubcategoriesIdUsagesListEndpoint(client, parent_endpoint=self) + ServiceKnowledgebasesubcategoriesIdUsagesListEndpoint( + client, parent_endpoint=self + ) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/knowledgeBaseSubCategories/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +42,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/knowledgeBaseSubCategories/{id}/usages endpoint. @@ -47,4 +54,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdUsagesListEndpoint.py index e212bbb62..38dc0d90a 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgeBaseSubCategoriesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceKnowledgebasesubcategoriesIdUsagesListEndpoint(ConnectWiseEndpoint) def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/knowledgeBaseSubCategories/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/knowledgeBaseSubCategories/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgebasesettingsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgebasesettingsEndpoint.py index 1bc80e948..a18de5d6a 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgebasesettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgebasesettingsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceKnowledgebasesettingsIdEndpoint import ServiceKnowledgebasesettingsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceKnowledgebasesettingsIdEndpoint import ( + ServiceKnowledgebasesettingsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import KnowledgeBaseSettings from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -9,7 +11,9 @@ class ServiceKnowledgebasesettingsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "knowledgebasesettings", parent_endpoint=parent_endpoint) + super().__init__( + client, "knowledgebasesettings", parent_endpoint=parent_endpoint + ) def id(self, id: int) -> ServiceKnowledgebasesettingsIdEndpoint: """ @@ -20,7 +24,9 @@ def id(self, id: int) -> ServiceKnowledgebasesettingsIdEndpoint: Returns: ServiceKnowledgebasesettingsIdEndpoint: The initialized ServiceKnowledgebasesettingsIdEndpoint object. """ - child = ServiceKnowledgebasesettingsIdEndpoint(self.client, parent_endpoint=self) + child = ServiceKnowledgebasesettingsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -47,7 +53,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSettings: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseSettings: """ Performs a GET request against the /service/knowledgebasesettings endpoint. @@ -57,9 +65,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KnowledgeBaseSettings: The parsed response data. """ - return self._parse_one(KnowledgeBaseSettings, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseSettings, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSettings: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseSettings: """ Performs a POST request against the /service/knowledgebasesettings endpoint. @@ -69,4 +82,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: KnowledgeBaseSettings: The parsed response data. """ - return self._parse_one(KnowledgeBaseSettings, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseSettings, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceKnowledgebasesettingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceKnowledgebasesettingsIdEndpoint.py index 10c1e0ca4..bc2550588 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceKnowledgebasesettingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceKnowledgebasesettingsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSettings: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseSettings: """ Performs a GET request against the /service/knowledgebasesettings/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KnowledgeBaseSettings: The parsed response data. """ - return self._parse_one(KnowledgeBaseSettings, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseSettings, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSettings: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseSettings: """ Performs a PUT request against the /service/knowledgebasesettings/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KnowledgeBaseSettings: The parsed response data. """ - return self._parse_one(KnowledgeBaseSettings, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseSettings, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KnowledgeBaseSettings: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KnowledgeBaseSettings: """ Performs a PATCH request against the /service/knowledgebasesettings/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: KnowledgeBaseSettings: The parsed response data. """ - return self._parse_one(KnowledgeBaseSettings, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + KnowledgeBaseSettings, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceLocationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceLocationsCountEndpoint.py index 6b7f2f14b..534569259 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceLocationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceLocationsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceLocationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/locations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/locations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceLocationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceLocationsEndpoint.py index c6a3aab04..79cce32b3 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceLocationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceLocationsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceLocationsCountEndpoint import ServiceLocationsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceLocationsIdEndpoint import ServiceLocationsIdEndpoint -from pyconnectwise.endpoints.manage.ServiceLocationsInfoEndpoint import ServiceLocationsInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceLocationsCountEndpoint import ( + ServiceLocationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceLocationsIdEndpoint import ( + ServiceLocationsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceLocationsInfoEndpoint import ( + ServiceLocationsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceLocation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ServiceLocationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "locations", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceLocationsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceLocationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceLocationsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceLocationsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceLocationsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceLocation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceLocation]: """ Performs a GET request against the /service/locations endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceLocation]: The parsed response data. """ - return self._parse_many(ServiceLocation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceLocation, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceLocation: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceLocation: """ Performs a POST request against the /service/locations endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceLocation: The parsed response data. """ - return self._parse_one(ServiceLocation, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ServiceLocation, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceLocationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceLocationsIdEndpoint.py index 2125f7ed9..0b2dbfa29 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceLocationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceLocationsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceLocationsIdInfoEndpoint import ServiceLocationsIdInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceLocationsIdInfoEndpoint import ( + ServiceLocationsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceLocation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceLocationsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceLocationsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ServiceLocationsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceLocation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceLocation: """ Performs a GET request against the /service/locations/{id} endpoint. @@ -46,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceLocation: The parsed response data. """ - return self._parse_one(ServiceLocation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceLocation, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/locations/{id} endpoint. @@ -58,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceLocation: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceLocation: """ Performs a PUT request against the /service/locations/{id} endpoint. @@ -70,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceLocation: The parsed response data. """ - return self._parse_one(ServiceLocation, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ServiceLocation, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceLocation: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceLocation: """ Performs a PATCH request against the /service/locations/{id} endpoint. @@ -82,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceLocation: The parsed response data. """ - return self._parse_one(ServiceLocation, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ServiceLocation, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceLocationsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceLocationsIdInfoEndpoint.py index 66f3e7aaa..d2ab3bf31 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceLocationsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceLocationsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceLocationInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceLocationInfo: """ Performs a GET request against the /service/locations/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceLocationInfo: The parsed response data. """ - return self._parse_one(ServiceLocationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceLocationInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceLocationsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceLocationsInfoCountEndpoint.py index ad7cae470..45f43d401 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceLocationsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceLocationsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceLocationsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/locations/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/locations/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceLocationsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceLocationsInfoEndpoint.py index 1a6c116d9..4835a63c0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceLocationsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceLocationsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceLocationsInfoCountEndpoint import ServiceLocationsInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceLocationsInfoCountEndpoint import ( + ServiceLocationsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceLocationInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceLocationsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceLocationsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceLocationsInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceLocationInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceLocationInfo]: """ Performs a GET request against the /service/locations/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceLocationInfo]: The parsed response data. """ - return self._parse_many(ServiceLocationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceLocationInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServicePrioritiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePrioritiesCountEndpoint.py index fe69fad49..6557d7c4f 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePrioritiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePrioritiesCountEndpoint.py @@ -10,7 +10,9 @@ class ServicePrioritiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/priorities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/priorities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServicePrioritiesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePrioritiesEndpoint.py index 1679bdb80..960f26f0a 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePrioritiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePrioritiesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServicePrioritiesCountEndpoint import ServicePrioritiesCountEndpoint -from pyconnectwise.endpoints.manage.ServicePrioritiesIdEndpoint import ServicePrioritiesIdEndpoint +from pyconnectwise.endpoints.manage.ServicePrioritiesCountEndpoint import ( + ServicePrioritiesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServicePrioritiesIdEndpoint import ( + ServicePrioritiesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Priority from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServicePrioritiesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "priorities", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServicePrioritiesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServicePrioritiesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServicePrioritiesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServicePrioritiesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Priority]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Priority]: """ Performs a GET request against the /service/priorities endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Priority]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Priority]: """ Performs a GET request against the /service/priorities endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Priority]: The parsed response data. """ - return self._parse_many(Priority, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Priority, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Priority: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Priority: """ Performs a POST request against the /service/priorities endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Priority: The parsed response data. """ - return self._parse_one(Priority, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Priority, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdEndpoint.py index 56a9d06b3..dc8741dea 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServicePrioritiesIdImageEndpoint import ServicePrioritiesIdImageEndpoint -from pyconnectwise.endpoints.manage.ServicePrioritiesIdUsagesEndpoint import ServicePrioritiesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServicePrioritiesIdImageEndpoint import ( + ServicePrioritiesIdImageEndpoint, +) +from pyconnectwise.endpoints.manage.ServicePrioritiesIdUsagesEndpoint import ( + ServicePrioritiesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Priority from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class ServicePrioritiesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.usages = self._register_child_endpoint(ServicePrioritiesIdUsagesEndpoint(client, parent_endpoint=self)) - self.image = self._register_child_endpoint(ServicePrioritiesIdImageEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ServicePrioritiesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.image = self._register_child_endpoint( + ServicePrioritiesIdImageEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Priority]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Priority]: """ Performs a GET request against the /service/priorities/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Priority: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Priority: """ Performs a GET request against the /service/priorities/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: Priority: The parsed response data. """ - return self._parse_one(Priority, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Priority, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/priorities/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Priority: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Priority: """ Performs a PUT request against the /service/priorities/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: Priority: The parsed response data. """ - return self._parse_one(Priority, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Priority, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Priority: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Priority: """ Performs a PATCH request against the /service/priorities/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Priority: The parsed response data. """ - return self._parse_one(Priority, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Priority, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdImageEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdImageEndpoint.py index 12feb7aaf..c2b7bd154 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdImageEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdImageEndpoint.py @@ -9,7 +9,9 @@ class ServicePrioritiesIdImageEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "image", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a GET request against the /service/priorities/{id}/image endpoint. @@ -19,4 +21,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdUsagesEndpoint.py index d68c7f162..d5b2e511a 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServicePrioritiesIdUsagesListEndpoint import ServicePrioritiesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServicePrioritiesIdUsagesListEndpoint import ( + ServicePrioritiesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ServicePrioritiesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ServicePrioritiesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ServicePrioritiesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/priorities/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/priorities/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdUsagesListEndpoint.py index 67ccc418d..a9949135b 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePrioritiesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServicePrioritiesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/priorities/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/priorities/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServicePriorityEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePriorityEndpoint.py index 1e66dd987..60a506a48 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePriorityEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePriorityEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServicePriorityIdEndpoint import ServicePriorityIdEndpoint -from pyconnectwise.endpoints.manage.ServicePriorityInfoEndpoint import ServicePriorityInfoEndpoint +from pyconnectwise.endpoints.manage.ServicePriorityIdEndpoint import ( + ServicePriorityIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServicePriorityInfoEndpoint import ( + ServicePriorityInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class ServicePriorityEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "priority", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServicePriorityInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ServicePriorityInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServicePriorityIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/ServicePriorityIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePriorityIdEndpoint.py index 5f0860d9a..a654a0a0e 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePriorityIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePriorityIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServicePriorityIdInfoEndpoint import ServicePriorityIdInfoEndpoint +from pyconnectwise.endpoints.manage.ServicePriorityIdInfoEndpoint import ( + ServicePriorityIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ServicePriorityIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServicePriorityIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ServicePriorityIdInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ServicePriorityIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePriorityIdInfoEndpoint.py index c5e584210..8e0ed00d6 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePriorityIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePriorityIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PriorityInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PriorityInfo: """ Performs a GET request against the /service/priority/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PriorityInfo: The parsed response data. """ - return self._parse_one(PriorityInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PriorityInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServicePriorityInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServicePriorityInfoEndpoint.py index 9ac3aad17..1951f4860 100644 --- a/src/pyconnectwise/endpoints/manage/ServicePriorityInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServicePriorityInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PriorityInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PriorityInfo]: """ Performs a GET request against the /service/priority/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PriorityInfo]: The parsed response data. """ - return self._parse_many(PriorityInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PriorityInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSLAsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSLAsCountEndpoint.py index 1b2d599f2..de52cacd3 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSLAsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSLAsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSlasCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/SLAs/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/SLAs/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSLAsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSLAsEndpoint.py index 305e5380a..6883294fc 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSLAsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSLAsEndpoint.py @@ -2,7 +2,9 @@ from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.endpoints.manage.ServiceSlasIdEndpoint import ServiceSlasIdEndpoint -from pyconnectwise.endpoints.manage.ServiceSlasInfoEndpoint import ServiceSlasInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceSlasInfoEndpoint import ( + ServiceSlasInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceSlasEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "slas", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceSlasInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ServiceSlasInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceSlasIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdEndpoint.py index 8d15454a3..29d95532e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSlasIdInfoEndpoint import ServiceSlasIdInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceSlasIdInfoEndpoint import ( + ServiceSlasIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ServiceSlasIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceSlasIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ServiceSlasIdInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesCountEndpoint.py index 2521d7c42..d32bf7ab1 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSlasIdPrioritiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/SLAs/{id}/priorities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/SLAs/{id}/priorities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesEndpoint.py index 9c1c7f560..99b309a8c 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSlasIdPrioritiesCountEndpoint import ServiceSlasIdPrioritiesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceSlasIdPrioritiesIdEndpoint import ServiceSlasIdPrioritiesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceSlasIdPrioritiesCountEndpoint import ( + ServiceSlasIdPrioritiesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSlasIdPrioritiesIdEndpoint import ( + ServiceSlasIdPrioritiesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SLAPriority from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceSlasIdPrioritiesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "priorities", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceSlasIdPrioritiesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceSlasIdPrioritiesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceSlasIdPrioritiesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceSlasIdPrioritiesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SLAPriority]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SLAPriority]: """ Performs a GET request against the /service/SLAs/{id}/priorities endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SLAPriority]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SLAPriority]: """ Performs a GET request against the /service/SLAs/{id}/priorities endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SLAPriority]: The parsed response data. """ - return self._parse_many(SLAPriority, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SLAPriority, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SLAPriority: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SLAPriority: """ Performs a POST request against the /service/SLAs/{id}/priorities endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SLAPriority: The parsed response data. """ - return self._parse_one(SLAPriority, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SLAPriority, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesIdEndpoint.py index 2190f4fca..f65515365 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdPrioritiesIdEndpoint.py @@ -10,7 +10,9 @@ class ServiceSlasIdPrioritiesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SLAPriority]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SLAPriority]: """ Performs a GET request against the /service/SLAs/{id}/priorities/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SLAPriority: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SLAPriority: """ Performs a GET request against the /service/SLAs/{id}/priorities/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SLAPriority: The parsed response data. """ - return self._parse_one(SLAPriority, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SLAPriority, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/SLAs/{id}/priorities/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SLAPriority: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SLAPriority: """ Performs a PUT request against the /service/SLAs/{id}/priorities/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SLAPriority: The parsed response data. """ - return self._parse_one(SLAPriority, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SLAPriority, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SLAPriority: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SLAPriority: """ Performs a PATCH request against the /service/SLAs/{id}/priorities/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SLAPriority: The parsed response data. """ - return self._parse_one(SLAPriority, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SLAPriority, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdUsagesEndpoint.py index 667b815db..3c1232b88 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSlasIdUsagesListEndpoint import ServiceSlasIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceSlasIdUsagesListEndpoint import ( + ServiceSlasIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ServiceSlasIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ServiceSlasIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ServiceSlasIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/SLAs/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/SLAs/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdUsagesListEndpoint.py index 8f4e1249e..cf04e4781 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSLAsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSLAsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceSlasIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/SLAs/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/SLAs/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSLAsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSLAsInfoCountEndpoint.py index 5dd328ba5..4c9f9f286 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSLAsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSLAsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSlasInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/SLAs/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/SLAs/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSchedulingEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSchedulingEndpoint.py index 0cf3ea698..dba31e096 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSchedulingEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSchedulingEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSchedulingMembersEndpoint import ServiceSchedulingMembersEndpoint +from pyconnectwise.endpoints.manage.ServiceSchedulingMembersEndpoint import ( + ServiceSchedulingMembersEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ServiceSchedulingEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "scheduling", parent_endpoint=parent_endpoint) - self.members = self._register_child_endpoint(ServiceSchedulingMembersEndpoint(client, parent_endpoint=self)) + self.members = self._register_child_endpoint( + ServiceSchedulingMembersEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersEndpoint.py index 9827518ff..9d972077b 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSchedulingMembersIdEndpoint import ServiceSchedulingMembersIdEndpoint -from pyconnectwise.endpoints.manage.ServiceSchedulingMembersInfoEndpoint import ServiceSchedulingMembersInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceSchedulingMembersIdEndpoint import ( + ServiceSchedulingMembersIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSchedulingMembersInfoEndpoint import ( + ServiceSchedulingMembersInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class ServiceSchedulingMembersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "members", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceSchedulingMembersInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ServiceSchedulingMembersInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceSchedulingMembersIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersIdEndpoint.py index 13c8e91fd..dba9e660f 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSchedulingMembersIdInfoEndpoint import ServiceSchedulingMembersIdInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceSchedulingMembersIdInfoEndpoint import ( + ServiceSchedulingMembersIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ServiceSchedulingMembersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceSchedulingMembersIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ServiceSchedulingMembersIdInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersIdInfoEndpoint.py index 3c2c1d7ad..e3366cad8 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SchedulingMemberInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SchedulingMemberInfo: """ Performs a GET request against the /service/scheduling/members/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SchedulingMemberInfo: The parsed response data. """ - return self._parse_one(SchedulingMemberInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SchedulingMemberInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersInfoCountEndpoint.py index df02c968b..7effaf3c6 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSchedulingMembersInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/scheduling/members/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/scheduling/members/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersInfoEndpoint.py index 953ac8ee1..91691e927 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSchedulingMembersInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSchedulingMembersInfoCountEndpoint import \ - ServiceSchedulingMembersInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceSchedulingMembersInfoCountEndpoint import ( + ServiceSchedulingMembersInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SchedulingMemberInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SchedulingMemberInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SchedulingMemberInfo]: """ Performs a GET request against the /service/scheduling/members/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SchedulingMemberInfo]: The parsed response data. """ - return self._parse_many(SchedulingMemberInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SchedulingMemberInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffCountEndpoint.py index faac5d386..8adf9e392 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceServicesignoffCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/serviceSignoff/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/serviceSignoff/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffEndpoint.py index d0942ab20..494bec80b 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffCountEndpoint import ServiceServicesignoffCountEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffIdEndpoint import ServiceServicesignoffIdEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffInfoEndpoint import ServiceServicesignoffInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceServicesignoffCountEndpoint import ( + ServiceServicesignoffCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceServicesignoffIdEndpoint import ( + ServiceServicesignoffIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceServicesignoffInfoEndpoint import ( + ServiceServicesignoffInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceSignoff from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ServiceServicesignoffEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "serviceSignoff", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceServicesignoffInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceServicesignoffCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceServicesignoffCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceServicesignoffInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceServicesignoffIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceSignoff]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceSignoff]: """ Performs a GET request against the /service/serviceSignoff endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceSignoff]: The parsed response data. """ - return self._parse_many(ServiceSignoff, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceSignoff, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoff: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSignoff: """ Performs a POST request against the /service/serviceSignoff endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceSignoff: The parsed response data. """ - return self._parse_one(ServiceSignoff, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ServiceSignoff, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdEndpoint.py index 3e89071bb..7dc206192 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdEndpoint.py @@ -1,10 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffIdInfoEndpoint import ServiceServicesignoffIdInfoEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffIdSignoffcustomfieldsEndpoint import \ - ServiceServicesignoffIdSignoffcustomfieldsEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffIdUsagesEndpoint import ServiceServicesignoffIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceServicesignoffIdInfoEndpoint import ( + ServiceServicesignoffIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceServicesignoffIdSignoffcustomfieldsEndpoint import ( + ServiceServicesignoffIdSignoffcustomfieldsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceServicesignoffIdUsagesEndpoint import ( + ServiceServicesignoffIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceSignoff from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,10 +19,16 @@ class ServiceServicesignoffIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceServicesignoffIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ServiceServicesignoffIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ServiceServicesignoffIdUsagesEndpoint(client, parent_endpoint=self) + ) self.signoffcustomfields = self._register_child_endpoint( - ServiceServicesignoffIdSignoffcustomfieldsEndpoint(client, parent_endpoint=self) + ServiceServicesignoffIdSignoffcustomfieldsEndpoint( + client, parent_endpoint=self + ) + ) + self.info = self._register_child_endpoint( + ServiceServicesignoffIdInfoEndpoint(client, parent_endpoint=self) ) def paginated( @@ -43,7 +54,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoff: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSignoff: """ Performs a GET request against the /service/serviceSignoff/{id} endpoint. @@ -53,9 +66,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceSignoff: The parsed response data. """ - return self._parse_one(ServiceSignoff, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceSignoff, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/serviceSignoff/{id} endpoint. @@ -65,9 +83,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoff: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSignoff: """ Performs a PUT request against the /service/serviceSignoff/{id} endpoint. @@ -77,9 +100,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceSignoff: The parsed response data. """ - return self._parse_one(ServiceSignoff, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ServiceSignoff, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoff: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSignoff: """ Performs a PATCH request against the /service/serviceSignoff/{id} endpoint. @@ -89,4 +117,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceSignoff: The parsed response data. """ - return self._parse_one(ServiceSignoff, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ServiceSignoff, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdInfoEndpoint.py index dfc9f63df..21c3ec259 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoffInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSignoffInfo: """ Performs a GET request against the /service/serviceSignoff/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceSignoffInfo: The parsed response data. """ - return self._parse_one(ServiceSignoffInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceSignoffInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdUsagesEndpoint.py index 4d668e3ab..d86fbdec9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffIdUsagesListEndpoint import \ - ServiceServicesignoffIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceServicesignoffIdUsagesListEndpoint import ( + ServiceServicesignoffIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): ServiceServicesignoffIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/serviceSignoff/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/serviceSignoff/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdUsagesListEndpoint.py index 71cb2a206..920d5b947 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceServicesignoffIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/serviceSignoff/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/serviceSignoff/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffInfoCountEndpoint.py index c70b0cec4..aaee0b628 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceServicesignoffInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/serviceSignoff/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/serviceSignoff/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffInfoEndpoint.py index a3145cc02..837ee3cfb 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServiceSignoffInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffInfoCountEndpoint import ServiceServicesignoffInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceServicesignoffInfoCountEndpoint import ( + ServiceServicesignoffInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceSignoffInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceServicesignoffInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceServicesignoffInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceServicesignoffInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceSignoffInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceSignoffInfo]: """ Performs a GET request against the /service/serviceSignoff/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceSignoffInfo]: The parsed response data. """ - return self._parse_many(ServiceSignoffInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceSignoffInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint.py index e8f3f23a1..07e21b4b9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint(ConnectWiseEndpoin def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/serviceSignoff/{id}/signoffcustomfields/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/serviceSignoff/{id}/signoffcustomfields/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsEndpoint.py index 045307252..9480c3ee8 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint import \ - ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint import \ - ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint import ( + ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint import ( + ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceSignoffCustomField from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "signoffcustomfields", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint(client, parent_endpoint=self) + ServiceServicesignoffIdSignoffcustomfieldsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint: Returns: ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint: The initialized ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint object. """ - child = ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint(self.client, parent_endpoint=self) + child = ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceSignoffCustomField]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceSignoffCustomField]: """ Performs a GET request against the /service/serviceSignoff/{id}/signoffcustomfields endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ServiceSignoffCustomField]: The parsed response data. """ return self._parse_many( - ServiceSignoffCustomField, super()._make_request("GET", data=data, params=params).json() + ServiceSignoffCustomField, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoffCustomField: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSignoffCustomField: """ Performs a POST request against the /service/serviceSignoff/{id}/signoffcustomfields endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoffCustomField: The parsed response data. """ return self._parse_one( - ServiceSignoffCustomField, super()._make_request("POST", data=data, params=params).json() + ServiceSignoffCustomField, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint.py index a47726851..94833e0be 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceServicesignoffIdSignoffcustomfieldsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoffCustomField: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSignoffCustomField: """ Performs a GET request against the /service/serviceSignoff/{id}/signoffcustomfields/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceSignoffCustomField: The parsed response data. """ - return self._parse_one(ServiceSignoffCustomField, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceSignoffCustomField, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoffCustomField: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSignoffCustomField: """ Performs a PUT request against the /service/serviceSignoff/{id}/signoffcustomfields/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceSignoffCustomField: The parsed response data. """ - return self._parse_one(ServiceSignoffCustomField, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ServiceSignoffCustomField, + super()._make_request("PUT", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/serviceSignoff/{id}/signoffcustomfields/{id} endpoint. @@ -67,9 +79,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoffCustomField: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSignoffCustomField: """ Performs a PATCH request against the /service/serviceSignoff/{id}/signoffcustomfields/{id} endpoint. @@ -80,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSignoffCustomField: The parsed response data. """ return self._parse_one( - ServiceSignoffCustomField, super()._make_request("PATCH", data=data, params=params).json() + ServiceSignoffCustomField, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSeveritiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSeveritiesCountEndpoint.py index 07194fee7..5ceb2d1a9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSeveritiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSeveritiesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSeveritiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/severities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/severities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSeveritiesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSeveritiesEndpoint.py index ffad8cae8..0bbff5721 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSeveritiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSeveritiesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSeveritiesCountEndpoint import ServiceSeveritiesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceSeveritiesIdEndpoint import ServiceSeveritiesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceSeveritiesCountEndpoint import ( + ServiceSeveritiesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSeveritiesIdEndpoint import ( + ServiceSeveritiesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Severity from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceSeveritiesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "severities", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceSeveritiesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceSeveritiesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceSeveritiesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceSeveritiesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Severity]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Severity]: """ Performs a GET request against the /service/severities endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Severity]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Severity]: """ Performs a GET request against the /service/severities endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Severity]: The parsed response data. """ - return self._parse_many(Severity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Severity, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSeveritiesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSeveritiesIdEndpoint.py index aa98b1a3c..92c1586d9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSeveritiesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSeveritiesIdEndpoint.py @@ -10,7 +10,9 @@ class ServiceSeveritiesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Severity]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Severity]: """ Performs a GET request against the /service/severities/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Severity: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Severity: """ Performs a GET request against the /service/severities/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Severity: The parsed response data. """ - return self._parse_one(Severity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Severity, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Severity: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Severity: """ Performs a PUT request against the /service/severities/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Severity: The parsed response data. """ - return self._parse_one(Severity, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Severity, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Severity: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Severity: """ Performs a PATCH request against the /service/severities/{id} endpoint. @@ -65,4 +77,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Severity: The parsed response data. """ - return self._parse_one(Severity, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Severity, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSlasIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSlasIdInfoEndpoint.py index 3e8adea57..b9a36bdf1 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSlasIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSlasIdInfoEndpoint.py @@ -10,7 +10,9 @@ class ServiceSlasIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SLAInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SLAInfo]: """ Performs a GET request against the /service/slas/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SLAInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SLAInfo: """ Performs a GET request against the /service/slas/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SLAInfo: The parsed response data. """ - return self._parse_one(SLAInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SLAInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSlasInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSlasInfoEndpoint.py index d2c4185be..e2850ddf6 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSlasInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSlasInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSlasInfoCountEndpoint import ServiceSlasInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceSlasInfoCountEndpoint import ( + ServiceSlasInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class ServiceSlasInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceSlasInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceSlasInfoCountEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSourcesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSourcesCountEndpoint.py index 30a49bf97..01814ca5b 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSourcesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSourcesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSourcesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/sources/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/sources/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSourcesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSourcesEndpoint.py index bd4ec91c5..00946e809 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSourcesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSourcesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSourcesCountEndpoint import ServiceSourcesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceSourcesIdEndpoint import ServiceSourcesIdEndpoint -from pyconnectwise.endpoints.manage.ServiceSourcesInfoEndpoint import ServiceSourcesInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceSourcesCountEndpoint import ( + ServiceSourcesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSourcesIdEndpoint import ( + ServiceSourcesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSourcesInfoEndpoint import ( + ServiceSourcesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Source from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ServiceSourcesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "sources", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceSourcesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceSourcesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceSourcesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceSourcesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceSourcesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> ServiceSourcesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Source]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Source]: """ Performs a GET request against the /service/sources endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Source]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Source]: """ Performs a GET request against the /service/sources endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Source]: The parsed response data. """ - return self._parse_many(Source, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Source, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Source: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Source: """ Performs a POST request against the /service/sources endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Source: The parsed response data. """ - return self._parse_one(Source, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Source, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSourcesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSourcesIdEndpoint.py index bc050a734..45cb1e022 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSourcesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSourcesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSourcesIdInfoEndpoint import ServiceSourcesIdInfoEndpoint -from pyconnectwise.endpoints.manage.ServiceSourcesIdUsagesEndpoint import ServiceSourcesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceSourcesIdInfoEndpoint import ( + ServiceSourcesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSourcesIdUsagesEndpoint import ( + ServiceSourcesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Source from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class ServiceSourcesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceSourcesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ServiceSourcesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ServiceSourcesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceSourcesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Source]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Source]: """ Performs a GET request against the /service/sources/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Source: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Source: """ Performs a GET request against the /service/sources/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Source: The parsed response data. """ - return self._parse_one(Source, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Source, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/sources/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Source: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Source: """ Performs a PUT request against the /service/sources/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Source: The parsed response data. """ - return self._parse_one(Source, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Source, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Source: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Source: """ Performs a PATCH request against the /service/sources/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Source: The parsed response data. """ - return self._parse_one(Source, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Source, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSourcesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSourcesIdInfoEndpoint.py index 552de9da4..45019eee0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSourcesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSourcesIdInfoEndpoint.py @@ -10,7 +10,9 @@ class ServiceSourcesIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SourceInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SourceInfo]: """ Performs a GET request against the /service/sources/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SourceInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SourceInfo: """ Performs a GET request against the /service/sources/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SourceInfo: The parsed response data. """ - return self._parse_one(SourceInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SourceInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSourcesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSourcesIdUsagesEndpoint.py index b24ee2e6a..f2acddabe 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSourcesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSourcesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSourcesIdUsagesListEndpoint import ServiceSourcesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceSourcesIdUsagesListEndpoint import ( + ServiceSourcesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ServiceSourcesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ServiceSourcesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ServiceSourcesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/sources/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/sources/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSourcesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSourcesIdUsagesListEndpoint.py index 8813ff377..23361f7c6 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSourcesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSourcesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceSourcesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/sources/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/sources/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSourcesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSourcesInfoCountEndpoint.py index 626db0257..dfccd1924 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSourcesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSourcesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSourcesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/sources/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/sources/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSourcesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSourcesInfoEndpoint.py index 98841750d..732501c4f 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSourcesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSourcesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSourcesInfoCountEndpoint import ServiceSourcesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceSourcesInfoCountEndpoint import ( + ServiceSourcesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SourceInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ServiceSourcesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceSourcesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceSourcesInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SourceInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SourceInfo]: """ Performs a GET request against the /service/sources/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SourceInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SourceInfo]: """ Performs a GET request against the /service/sources/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SourceInfo]: The parsed response data. """ - return self._parse_many(SourceInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SourceInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysCountEndpoint.py index ada3b70f4..a2e75547c 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSurveysCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/surveys/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/surveys/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysEndpoint.py index 9190ad7b0..c20031d74 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysCountEndpoint import ServiceSurveysCountEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdEndpoint import ServiceSurveysIdEndpoint +from pyconnectwise.endpoints.manage.ServiceSurveysCountEndpoint import ( + ServiceSurveysCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSurveysIdEndpoint import ( + ServiceSurveysIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceSurvey from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceSurveysEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "surveys", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceSurveysCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceSurveysCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceSurveysIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceSurvey]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceSurvey]: """ Performs a GET request against the /service/surveys endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceSurvey]: The parsed response data. """ - return self._parse_many(ServiceSurvey, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceSurvey, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurvey: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurvey: """ Performs a POST request against the /service/surveys endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceSurvey: The parsed response data. """ - return self._parse_one(ServiceSurvey, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ServiceSurvey, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdCopyEndpoint.py index 646185428..0c17ac736 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdCopyEndpoint.py @@ -10,7 +10,9 @@ class ServiceSurveysIdCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurvey: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurvey: """ Performs a POST request against the /service/surveys/{id}/copy endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceSurvey: The parsed response data. """ - return self._parse_one(ServiceSurvey, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ServiceSurvey, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdEndpoint.py index 7e7a48a11..eac63cac5 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdEndpoint.py @@ -1,10 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdCopyEndpoint import ServiceSurveysIdCopyEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsEndpoint import ServiceSurveysIdQuestionsEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdResultsEndpoint import ServiceSurveysIdResultsEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdUsagesEndpoint import ServiceSurveysIdUsagesEndpoint +from pyconnectwise.endpoints.manage.ServiceSurveysIdCopyEndpoint import ( + ServiceSurveysIdCopyEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsEndpoint import ( + ServiceSurveysIdQuestionsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSurveysIdResultsEndpoint import ( + ServiceSurveysIdResultsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSurveysIdUsagesEndpoint import ( + ServiceSurveysIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceSurvey from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,10 +22,18 @@ class ServiceSurveysIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.questions = self._register_child_endpoint(ServiceSurveysIdQuestionsEndpoint(client, parent_endpoint=self)) - self.results = self._register_child_endpoint(ServiceSurveysIdResultsEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(ServiceSurveysIdUsagesEndpoint(client, parent_endpoint=self)) - self.copy = self._register_child_endpoint(ServiceSurveysIdCopyEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + ServiceSurveysIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.results = self._register_child_endpoint( + ServiceSurveysIdResultsEndpoint(client, parent_endpoint=self) + ) + self.questions = self._register_child_endpoint( + ServiceSurveysIdQuestionsEndpoint(client, parent_endpoint=self) + ) + self.copy = self._register_child_endpoint( + ServiceSurveysIdCopyEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -42,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurvey: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurvey: """ Performs a GET request against the /service/surveys/{id} endpoint. @@ -52,9 +70,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceSurvey: The parsed response data. """ - return self._parse_one(ServiceSurvey, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceSurvey, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/surveys/{id} endpoint. @@ -64,9 +86,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurvey: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurvey: """ Performs a PUT request against the /service/surveys/{id} endpoint. @@ -76,9 +103,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceSurvey: The parsed response data. """ - return self._parse_one(ServiceSurvey, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ServiceSurvey, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurvey: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurvey: """ Performs a PATCH request against the /service/surveys/{id} endpoint. @@ -88,4 +119,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceSurvey: The parsed response data. """ - return self._parse_one(ServiceSurvey, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ServiceSurvey, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsCountEndpoint.py index 93b94749c..2a12cd1ac 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSurveysIdQuestionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/surveys/{id}/questions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/surveys/{id}/questions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsEndpoint.py index ead944be6..5acbbb8ab 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsCountEndpoint import ServiceSurveysIdQuestionsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdEndpoint import ServiceSurveysIdQuestionsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsCountEndpoint import ( + ServiceSurveysIdQuestionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdEndpoint import ( + ServiceSurveysIdQuestionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceSurveyQuestion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceSurveysIdQuestionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "questions", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceSurveysIdQuestionsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceSurveysIdQuestionsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceSurveysIdQuestionsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceSurveyQuestion]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceSurveyQuestion]: """ Performs a GET request against the /service/surveys/{id}/questions endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceSurveyQuestion]: The parsed response data. """ - return self._parse_many(ServiceSurveyQuestion, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceSurveyQuestion, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurveyQuestion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurveyQuestion: """ Performs a POST request against the /service/surveys/{id}/questions endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceSurveyQuestion: The parsed response data. """ - return self._parse_one(ServiceSurveyQuestion, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ServiceSurveyQuestion, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdCopyEndpoint.py index 564038ea1..aaaa6d85d 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdCopyEndpoint.py @@ -10,7 +10,9 @@ class ServiceSurveysIdQuestionsIdCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurveyQuestion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurveyQuestion: """ Performs a POST request against the /service/surveys/{id}/questions/{id}/copy endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceSurveyQuestion: The parsed response data. """ - return self._parse_one(ServiceSurveyQuestion, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ServiceSurveyQuestion, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdEndpoint.py index ca3ab76b4..14ec21528 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdCopyEndpoint import \ - ServiceSurveysIdQuestionsIdCopyEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdOptionsEndpoint import \ - ServiceSurveysIdQuestionsIdOptionsEndpoint +from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdCopyEndpoint import ( + ServiceSurveysIdQuestionsIdCopyEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdOptionsEndpoint import ( + ServiceSurveysIdQuestionsIdOptionsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceSurveyQuestion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -17,7 +19,9 @@ def __init__(self, client, parent_endpoint=None): self.options = self._register_child_endpoint( ServiceSurveysIdQuestionsIdOptionsEndpoint(client, parent_endpoint=self) ) - self.copy = self._register_child_endpoint(ServiceSurveysIdQuestionsIdCopyEndpoint(client, parent_endpoint=self)) + self.copy = self._register_child_endpoint( + ServiceSurveysIdQuestionsIdCopyEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -42,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurveyQuestion: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurveyQuestion: """ Performs a GET request against the /service/surveys/{id}/questions/{id} endpoint. @@ -52,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceSurveyQuestion: The parsed response data. """ - return self._parse_one(ServiceSurveyQuestion, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceSurveyQuestion, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/surveys/{id}/questions/{id} endpoint. @@ -64,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurveyQuestion: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurveyQuestion: """ Performs a PUT request against the /service/surveys/{id}/questions/{id} endpoint. @@ -76,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceSurveyQuestion: The parsed response data. """ - return self._parse_one(ServiceSurveyQuestion, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ServiceSurveyQuestion, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceSurveyQuestion: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceSurveyQuestion: """ Performs a PATCH request against the /service/surveys/{id}/questions/{id} endpoint. @@ -88,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceSurveyQuestion: The parsed response data. """ - return self._parse_one(ServiceSurveyQuestion, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ServiceSurveyQuestion, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsCountEndpoint.py index a0a1f1f84..455393676 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSurveysIdQuestionsIdOptionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/surveys/{id}/questions/{id}/options/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/surveys/{id}/questions/{id}/options/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsEndpoint.py index f75849c52..85e36cc16 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdOptionsCountEndpoint import \ - ServiceSurveysIdQuestionsIdOptionsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdOptionsIdEndpoint import \ - ServiceSurveysIdQuestionsIdOptionsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdOptionsCountEndpoint import ( + ServiceSurveysIdQuestionsIdOptionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSurveysIdQuestionsIdOptionsIdEndpoint import ( + ServiceSurveysIdQuestionsIdOptionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SurveyOption from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "options", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - ServiceSurveysIdQuestionsIdOptionsCountEndpoint(client, parent_endpoint=self) + ServiceSurveysIdQuestionsIdOptionsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> ServiceSurveysIdQuestionsIdOptionsIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> ServiceSurveysIdQuestionsIdOptionsIdEndpoint: Returns: ServiceSurveysIdQuestionsIdOptionsIdEndpoint: The initialized ServiceSurveysIdQuestionsIdOptionsIdEndpoint object. """ - child = ServiceSurveysIdQuestionsIdOptionsIdEndpoint(self.client, parent_endpoint=self) + child = ServiceSurveysIdQuestionsIdOptionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SurveyOption]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SurveyOption]: """ Performs a GET request against the /service/surveys/{id}/questions/{id}/options endpoint. @@ -64,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SurveyOption]: The parsed response data. """ - return self._parse_many(SurveyOption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SurveyOption, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyOption: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyOption: """ Performs a POST request against the /service/surveys/{id}/questions/{id}/options endpoint. @@ -76,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SurveyOption: The parsed response data. """ - return self._parse_one(SurveyOption, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SurveyOption, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsIdEndpoint.py index dac7540ee..70fa68fa9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdQuestionsIdOptionsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyOption: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyOption: """ Performs a GET request against the /service/surveys/{id}/questions/{id}/options/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SurveyOption: The parsed response data. """ - return self._parse_one(SurveyOption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SurveyOption, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/surveys/{id}/questions/{id}/options/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyOption: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyOption: """ Performs a PUT request against the /service/surveys/{id}/questions/{id}/options/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SurveyOption: The parsed response data. """ - return self._parse_one(SurveyOption, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SurveyOption, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyOption: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyOption: """ Performs a PATCH request against the /service/surveys/{id}/questions/{id}/options/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SurveyOption: The parsed response data. """ - return self._parse_one(SurveyOption, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SurveyOption, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsCountEndpoint.py index af7376ebb..b068fdc52 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceSurveysIdResultsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/surveys/{id}/results/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/surveys/{id}/results/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsEndpoint.py index a204b09a8..327dc463d 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdResultsCountEndpoint import ServiceSurveysIdResultsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdResultsIdEndpoint import ServiceSurveysIdResultsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceSurveysIdResultsCountEndpoint import ( + ServiceSurveysIdResultsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceSurveysIdResultsIdEndpoint import ( + ServiceSurveysIdResultsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SurveyResult from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceSurveysIdResultsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "results", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceSurveysIdResultsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceSurveysIdResultsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceSurveysIdResultsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SurveyResult]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SurveyResult]: """ Performs a GET request against the /service/surveys/{id}/results endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SurveyResult]: The parsed response data. """ - return self._parse_many(SurveyResult, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SurveyResult, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyResult: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyResult: """ Performs a POST request against the /service/surveys/{id}/results endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SurveyResult: The parsed response data. """ - return self._parse_one(SurveyResult, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SurveyResult, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsIdEndpoint.py index 4bb1d4eb4..ece02e569 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdResultsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyResult: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyResult: """ Performs a GET request against the /service/surveys/{id}/results/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SurveyResult: The parsed response data. """ - return self._parse_one(SurveyResult, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SurveyResult, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/surveys/{id}/results/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyResult: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyResult: """ Performs a PUT request against the /service/surveys/{id}/results/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SurveyResult: The parsed response data. """ - return self._parse_one(SurveyResult, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SurveyResult, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyResult: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyResult: """ Performs a PATCH request against the /service/surveys/{id}/results/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SurveyResult: The parsed response data. """ - return self._parse_one(SurveyResult, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SurveyResult, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdUsagesEndpoint.py index 965ae7c5b..b318e4def 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceSurveysIdUsagesListEndpoint import ServiceSurveysIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.ServiceSurveysIdUsagesListEndpoint import ( + ServiceSurveysIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ServiceSurveysIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(ServiceSurveysIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + ServiceSurveysIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/surveys/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/surveys/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdUsagesListEndpoint.py index b6b2590aa..f434cd70f 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceSurveysIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceSurveysIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class ServiceSurveysIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /service/surveys/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /service/surveys/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTeamMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTeamMembersEndpoint.py index f1533daf8..e8fd64d1e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTeamMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTeamMembersEndpoint.py @@ -10,7 +10,9 @@ class ServiceTeammembersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "teamMembers", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TeamMember: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TeamMember: """ Performs a POST request against the /service/teamMembers endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TeamMember: The parsed response data. """ - return self._parse_one(TeamMember, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TeamMember, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTeamsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTeamsCountEndpoint.py index b193a5aff..cc689884c 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTeamsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTeamsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTeamsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/teams/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/teams/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTeamsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTeamsEndpoint.py index 26553318a..809306797 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTeamsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTeamsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTeamsCountEndpoint import ServiceTeamsCountEndpoint +from pyconnectwise.endpoints.manage.ServiceTeamsCountEndpoint import ( + ServiceTeamsCountEndpoint, +) from pyconnectwise.endpoints.manage.ServiceTeamsIdEndpoint import ServiceTeamsIdEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceTeam @@ -12,7 +14,9 @@ class ServiceTeamsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "teams", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceTeamsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTeamsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceTeamsIdEndpoint: """ @@ -27,7 +31,9 @@ def id(self, id: int) -> ServiceTeamsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ServiceTeam]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ServiceTeam]: """ Performs a GET request against the /service/teams endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +54,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceTeam]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceTeam]: """ Performs a GET request against the /service/teams endpoint. @@ -58,4 +66,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceTeam]: The parsed response data. """ - return self._parse_many(ServiceTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceTeam, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTeamsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTeamsIdEndpoint.py index a40972b2e..c89bdf3d0 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTeamsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTeamsIdEndpoint.py @@ -10,7 +10,9 @@ class ServiceTeamsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ServiceTeam]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ServiceTeam]: """ Performs a GET request against the /service/teams/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceTeam: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceTeam: """ Performs a GET request against the /service/teams/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceTeam: The parsed response data. """ - return self._parse_one(ServiceTeam, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceTeam, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTemplatesCountEndpoint.py index f9b72560a..4e47c57a2 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTemplatesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTemplatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/templates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/templates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTemplatesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTemplatesEndpoint.py index c9ca864ac..c26414ba9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTemplatesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTemplatesCountEndpoint import ServiceTemplatesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceTemplatesIdEndpoint import ServiceTemplatesIdEndpoint -from pyconnectwise.endpoints.manage.ServiceTemplatesInfoEndpoint import ServiceTemplatesInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceTemplatesCountEndpoint import ( + ServiceTemplatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTemplatesIdEndpoint import ( + ServiceTemplatesIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTemplatesInfoEndpoint import ( + ServiceTemplatesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ServiceTemplatesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "templates", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceTemplatesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceTemplatesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTemplatesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceTemplatesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceTemplatesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceTemplate]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceTemplate]: """ Performs a GET request against the /service/templates endpoint. @@ -62,4 +74,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceTemplate]: The parsed response data. """ - return self._parse_many(ServiceTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdEndpoint.py index 2c22d710c..0c6df9fe8 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTemplatesIdGenerateEndpoint import ServiceTemplatesIdGenerateEndpoint -from pyconnectwise.endpoints.manage.ServiceTemplatesIdInfoEndpoint import ServiceTemplatesIdInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceTemplatesIdGenerateEndpoint import ( + ServiceTemplatesIdGenerateEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTemplatesIdInfoEndpoint import ( + ServiceTemplatesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceTemplate from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,8 +16,12 @@ class ServiceTemplatesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceTemplatesIdInfoEndpoint(client, parent_endpoint=self)) - self.generate = self._register_child_endpoint(ServiceTemplatesIdGenerateEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ServiceTemplatesIdInfoEndpoint(client, parent_endpoint=self) + ) + self.generate = self._register_child_endpoint( + ServiceTemplatesIdGenerateEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -38,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceTemplate: """ Performs a GET request against the /service/templates/{id} endpoint. @@ -48,4 +58,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceTemplate: The parsed response data. """ - return self._parse_one(ServiceTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdGenerateEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdGenerateEndpoint.py index ee7957d56..d5df91ed7 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdGenerateEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdGenerateEndpoint.py @@ -10,7 +10,9 @@ class ServiceTemplatesIdGenerateEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "generate", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TemplateGeneratedCountsModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TemplateGeneratedCountsModel: """ Performs a POST request against the /service/templates/{id}/generate endpoint. @@ -21,5 +23,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TemplateGeneratedCountsModel: The parsed response data. """ return self._parse_one( - TemplateGeneratedCountsModel, super()._make_request("POST", data=data, params=params).json() + TemplateGeneratedCountsModel, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdInfoEndpoint.py index 9b5196177..8151fb5a4 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTemplatesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceTemplateInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceTemplateInfo: """ Performs a GET request against the /service/templates/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceTemplateInfo: The parsed response data. """ - return self._parse_one(ServiceTemplateInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceTemplateInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTemplatesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTemplatesInfoCountEndpoint.py index 65042d683..7c1258c4f 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTemplatesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTemplatesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTemplatesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/templates/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/templates/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTemplatesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTemplatesInfoEndpoint.py index 0da6d825b..154f02b64 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTemplatesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTemplatesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTemplatesInfoCountEndpoint import ServiceTemplatesInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceTemplatesInfoCountEndpoint import ( + ServiceTemplatesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceTemplateInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceTemplatesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceTemplatesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTemplatesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceTemplateInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceTemplateInfo]: """ Performs a GET request against the /service/templates/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceTemplateInfo]: The parsed response data. """ - return self._parse_many(ServiceTemplateInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceTemplateInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksCountEndpoint.py index 8589bb106..895ece945 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketlinksCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/ticketLinks/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/ticketLinks/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksEndpoint.py index 3110f9738..0eda43e84 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketlinksCountEndpoint import ServiceTicketlinksCountEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketlinksIdEndpoint import ServiceTicketlinksIdEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketlinksInfoEndpoint import ServiceTicketlinksInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketlinksCountEndpoint import ( + ServiceTicketlinksCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketlinksIdEndpoint import ( + ServiceTicketlinksIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketlinksInfoEndpoint import ( + ServiceTicketlinksInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceTicketLink from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class ServiceTicketlinksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "ticketLinks", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceTicketlinksInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceTicketlinksCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTicketlinksCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceTicketlinksInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceTicketlinksIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceTicketLink]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceTicketLink]: """ Performs a GET request against the /service/ticketLinks endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceTicketLink]: The parsed response data. """ - return self._parse_many(ServiceTicketLink, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceTicketLink, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceTicketLink: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceTicketLink: """ Performs a POST request against the /service/ticketLinks endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceTicketLink: The parsed response data. """ - return self._parse_one(ServiceTicketLink, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ServiceTicketLink, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksIdEndpoint.py index a2a51ff33..30d94b9e3 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketlinksIdInfoEndpoint import ServiceTicketlinksIdInfoEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketlinksIdInfoEndpoint import ( + ServiceTicketlinksIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceTicketLink from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceTicketlinksIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceTicketlinksIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + ServiceTicketlinksIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceTicketLink: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceTicketLink: """ Performs a GET request against the /service/ticketLinks/{id} endpoint. @@ -46,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceTicketLink: The parsed response data. """ - return self._parse_one(ServiceTicketLink, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceTicketLink, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/ticketLinks/{id} endpoint. @@ -58,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceTicketLink: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceTicketLink: """ Performs a PUT request against the /service/ticketLinks/{id} endpoint. @@ -70,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceTicketLink: The parsed response data. """ - return self._parse_one(ServiceTicketLink, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ServiceTicketLink, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceTicketLink: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceTicketLink: """ Performs a PATCH request against the /service/ticketLinks/{id} endpoint. @@ -82,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceTicketLink: The parsed response data. """ - return self._parse_one(ServiceTicketLink, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ServiceTicketLink, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksIdInfoEndpoint.py index af998dbab..428d4fe15 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceTicketLinkInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceTicketLinkInfo: """ Performs a GET request against the /service/ticketLinks/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceTicketLinkInfo: The parsed response data. """ - return self._parse_one(ServiceTicketLinkInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceTicketLinkInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksInfoCountEndpoint.py index 96bea9a39..adc4a20f4 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketlinksInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/ticketLinks/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/ticketLinks/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksInfoEndpoint.py index 8c87583e8..a87063a7f 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketLinksInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketLinksInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketlinksInfoCountEndpoint import ServiceTicketlinksInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketlinksInfoCountEndpoint import ( + ServiceTicketlinksInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceTicketLinkInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceTicketlinksInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceTicketlinksInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTicketlinksInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceTicketLinkInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceTicketLinkInfo]: """ Performs a GET request against the /service/ticketLinks/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceTicketLinkInfo]: The parsed response data. """ - return self._parse_many(ServiceTicketLinkInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceTicketLinkInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsCountEndpoint.py index 35023ceba..ded399adb 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsyncsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/ticketSyncs/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/ticketSyncs/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsEndpoint.py index 4e92a6111..6bff306ef 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsyncsCountEndpoint import ServiceTicketsyncsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsyncsIdEndpoint import ServiceTicketsyncsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsyncsCountEndpoint import ( + ServiceTicketsyncsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsyncsIdEndpoint import ( + ServiceTicketsyncsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TicketSync from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceTicketsyncsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "ticketSyncs", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceTicketsyncsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTicketsyncsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceTicketsyncsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceTicketsyncsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TicketSync]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TicketSync]: """ Performs a GET request against the /service/ticketSyncs endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TicketSync]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TicketSync]: """ Performs a GET request against the /service/ticketSyncs endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TicketSync]: The parsed response data. """ - return self._parse_many(TicketSync, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TicketSync, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketSync: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketSync: """ Performs a POST request against the /service/ticketSyncs endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TicketSync: The parsed response data. """ - return self._parse_one(TicketSync, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TicketSync, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsIdEndpoint.py index bfc257221..9a14151e4 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketSyncsIdEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsyncsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TicketSync]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TicketSync]: """ Performs a GET request against the /service/ticketSyncs/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketSync: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketSync: """ Performs a GET request against the /service/ticketSyncs/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TicketSync: The parsed response data. """ - return self._parse_one(TicketSync, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TicketSync, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/ticketSyncs/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketSync: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketSync: """ Performs a PUT request against the /service/ticketSyncs/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TicketSync: The parsed response data. """ - return self._parse_one(TicketSync, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TicketSync, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketSync: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketSync: """ Performs a PATCH request against the /service/ticketSyncs/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TicketSync: The parsed response data. """ - return self._parse_one(TicketSync, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TicketSync, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsCountEndpoint.py index 7b74b9283..0af632c39 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsEndpoint.py index 5ffff14d4..4f1c459c9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsEndpoint.py @@ -1,10 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsCountEndpoint import ServiceTicketsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdEndpoint import ServiceTicketsIdEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsInfoEndpoint import ServiceTicketsInfoEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsSearchEndpoint import ServiceTicketsSearchEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsCountEndpoint import ( + ServiceTicketsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdEndpoint import ( + ServiceTicketsIdEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsInfoEndpoint import ( + ServiceTicketsInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsSearchEndpoint import ( + ServiceTicketsSearchEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Ticket from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,9 +22,15 @@ class ServiceTicketsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tickets", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceTicketsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(ServiceTicketsCountEndpoint(client, parent_endpoint=self)) - self.search = self._register_child_endpoint(ServiceTicketsSearchEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTicketsCountEndpoint(client, parent_endpoint=self) + ) + self.search = self._register_child_endpoint( + ServiceTicketsSearchEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceTicketsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceTicketsIdEndpoint: """ @@ -31,7 +45,9 @@ def id(self, id: int) -> ServiceTicketsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Ticket]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Ticket]: """ Performs a GET request against the /service/tickets endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +68,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Ticket]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Ticket]: """ Performs a GET request against the /service/tickets endpoint. @@ -62,9 +80,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Ticket]: The parsed response data. """ - return self._parse_many(Ticket, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Ticket, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Ticket: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Ticket: """ Performs a POST request against the /service/tickets endpoint. @@ -74,4 +96,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Ticket: The parsed response data. """ - return self._parse_one(Ticket, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Ticket, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdActivitiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdActivitiesCountEndpoint.py index 9f418e665..f67f9fc4f 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdActivitiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdActivitiesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdActivitiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/{id}/activities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/{id}/activities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdActivitiesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdActivitiesEndpoint.py index cbac73278..6615ec9e3 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdActivitiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdActivitiesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdActivitiesCountEndpoint import \ - ServiceTicketsIdActivitiesCountEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsIdActivitiesCountEndpoint import ( + ServiceTicketsIdActivitiesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ActivityReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ActivityReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ActivityReference]: """ Performs a GET request against the /service/tickets/{id}/activities endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ActivityReference]: The parsed response data. """ - return self._parse_many(ActivityReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ActivityReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdAllNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdAllNotesEndpoint.py index 2b02129a0..634793557 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdAllNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdAllNotesEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceTicketNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceTicketNote]: """ Performs a GET request against the /service/tickets/{id}/allNotes endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceTicketNote]: The parsed response data. """ - return self._parse_many(ServiceTicketNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceTicketNote, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdAttachChildrenEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdAttachChildrenEndpoint.py index 882f4a164..e2a003d65 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdAttachChildrenEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdAttachChildrenEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdAttachchildrenEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "attachChildren", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /service/tickets/{id}/attachChildren endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsCountEndpoint.py index 9c9b6dde6..f597eb80e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdConfigurationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/{id}/configurations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/{id}/configurations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsEndpoint.py index c1f17384f..daedcf72d 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdConfigurationsCountEndpoint import \ - ServiceTicketsIdConfigurationsCountEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdConfigurationsIdEndpoint import \ - ServiceTicketsIdConfigurationsIdEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsIdConfigurationsCountEndpoint import ( + ServiceTicketsIdConfigurationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdConfigurationsIdEndpoint import ( + ServiceTicketsIdConfigurationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConfigurationReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> ServiceTicketsIdConfigurationsIdEndpoint: Returns: ServiceTicketsIdConfigurationsIdEndpoint: The initialized ServiceTicketsIdConfigurationsIdEndpoint object. """ - child = ServiceTicketsIdConfigurationsIdEndpoint(self.client, parent_endpoint=self) + child = ServiceTicketsIdConfigurationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConfigurationReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConfigurationReference]: """ Performs a GET request against the /service/tickets/{id}/configurations endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ConfigurationReference]: The parsed response data. """ - return self._parse_many(ConfigurationReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ConfigurationReference, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationReference: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationReference: """ Performs a POST request against the /service/tickets/{id}/configurations endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConfigurationReference: The parsed response data. """ - return self._parse_one(ConfigurationReference, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ConfigurationReference, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsIdEndpoint.py index 397058ce7..c5d085d48 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConfigurationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConfigurationReference: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConfigurationReference: """ Performs a GET request against the /service/tickets/{id}/configurations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConfigurationReference: The parsed response data. """ - return self._parse_one(ConfigurationReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConfigurationReference, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/tickets/{id}/configurations/{id} endpoint. @@ -55,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConvertEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConvertEndpoint.py index 5acaf7929..ee87bc55e 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConvertEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdConvertEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdConvertEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "convert", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /service/tickets/{id}/convert endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdDocumentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdDocumentsCountEndpoint.py index e9a5adcca..763613353 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdDocumentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdDocumentsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdDocumentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/{id}/documents/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/{id}/documents/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdDocumentsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdDocumentsEndpoint.py index f8e3ce7b0..acb8f4e1c 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdDocumentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdDocumentsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdDocumentsCountEndpoint import ServiceTicketsIdDocumentsCountEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsIdDocumentsCountEndpoint import ( + ServiceTicketsIdDocumentsCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DocumentReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceTicketsIdDocumentsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "documents", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceTicketsIdDocumentsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTicketsIdDocumentsCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DocumentReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DocumentReference]: """ Performs a GET request against the /service/tickets/{id}/documents endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DocumentReference]: The parsed response data. """ - return self._parse_many(DocumentReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DocumentReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdEndpoint.py index 7728b85ae..57b426841 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdEndpoint.py @@ -1,20 +1,45 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdActivitiesEndpoint import ServiceTicketsIdActivitiesEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdAllnotesEndpoint import ServiceTicketsIdAllnotesEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdAttachchildrenEndpoint import ServiceTicketsIdAttachchildrenEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdConfigurationsEndpoint import ServiceTicketsIdConfigurationsEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdConvertEndpoint import ServiceTicketsIdConvertEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdDocumentsEndpoint import ServiceTicketsIdDocumentsEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdInfoEndpoint import ServiceTicketsIdInfoEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdMergeEndpoint import ServiceTicketsIdMergeEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdNotesEndpoint import ServiceTicketsIdNotesEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdProductsEndpoint import ServiceTicketsIdProductsEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdScheduleentriesEndpoint import \ - ServiceTicketsIdScheduleentriesEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdTasksEndpoint import ServiceTicketsIdTasksEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdTimeentriesEndpoint import ServiceTicketsIdTimeentriesEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsIdActivitiesEndpoint import ( + ServiceTicketsIdActivitiesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdAllnotesEndpoint import ( + ServiceTicketsIdAllnotesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdAttachchildrenEndpoint import ( + ServiceTicketsIdAttachchildrenEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdConfigurationsEndpoint import ( + ServiceTicketsIdConfigurationsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdConvertEndpoint import ( + ServiceTicketsIdConvertEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdDocumentsEndpoint import ( + ServiceTicketsIdDocumentsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdInfoEndpoint import ( + ServiceTicketsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdMergeEndpoint import ( + ServiceTicketsIdMergeEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdNotesEndpoint import ( + ServiceTicketsIdNotesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdProductsEndpoint import ( + ServiceTicketsIdProductsEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdScheduleentriesEndpoint import ( + ServiceTicketsIdScheduleentriesEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdTasksEndpoint import ( + ServiceTicketsIdTasksEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdTimeentriesEndpoint import ( + ServiceTicketsIdTimeentriesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Ticket from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -24,31 +49,49 @@ class ServiceTicketsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(ServiceTicketsIdInfoEndpoint(client, parent_endpoint=self)) - self.convert = self._register_child_endpoint(ServiceTicketsIdConvertEndpoint(client, parent_endpoint=self)) - self.attach_children = self._register_child_endpoint( - ServiceTicketsIdAttachchildrenEndpoint(client, parent_endpoint=self) + self.notes = self._register_child_endpoint( + ServiceTicketsIdNotesEndpoint(client, parent_endpoint=self) + ) + self.all_notes = self._register_child_endpoint( + ServiceTicketsIdAllnotesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + ServiceTicketsIdInfoEndpoint(client, parent_endpoint=self) ) - self.products = self._register_child_endpoint(ServiceTicketsIdProductsEndpoint(client, parent_endpoint=self)) - self.all_notes = self._register_child_endpoint(ServiceTicketsIdAllnotesEndpoint(client, parent_endpoint=self)) self.configurations = self._register_child_endpoint( ServiceTicketsIdConfigurationsEndpoint(client, parent_endpoint=self) ) - self.notes = self._register_child_endpoint(ServiceTicketsIdNotesEndpoint(client, parent_endpoint=self)) + self.timeentries = self._register_child_endpoint( + ServiceTicketsIdTimeentriesEndpoint(client, parent_endpoint=self) + ) + self.merge = self._register_child_endpoint( + ServiceTicketsIdMergeEndpoint(client, parent_endpoint=self) + ) + self.tasks = self._register_child_endpoint( + ServiceTicketsIdTasksEndpoint(client, parent_endpoint=self) + ) self.activities = self._register_child_endpoint( ServiceTicketsIdActivitiesEndpoint(client, parent_endpoint=self) ) + self.documents = self._register_child_endpoint( + ServiceTicketsIdDocumentsEndpoint(client, parent_endpoint=self) + ) self.scheduleentries = self._register_child_endpoint( ServiceTicketsIdScheduleentriesEndpoint(client, parent_endpoint=self) ) - self.tasks = self._register_child_endpoint(ServiceTicketsIdTasksEndpoint(client, parent_endpoint=self)) - self.documents = self._register_child_endpoint(ServiceTicketsIdDocumentsEndpoint(client, parent_endpoint=self)) - self.timeentries = self._register_child_endpoint( - ServiceTicketsIdTimeentriesEndpoint(client, parent_endpoint=self) + self.products = self._register_child_endpoint( + ServiceTicketsIdProductsEndpoint(client, parent_endpoint=self) + ) + self.attach_children = self._register_child_endpoint( + ServiceTicketsIdAttachchildrenEndpoint(client, parent_endpoint=self) + ) + self.convert = self._register_child_endpoint( + ServiceTicketsIdConvertEndpoint(client, parent_endpoint=self) ) - self.merge = self._register_child_endpoint(ServiceTicketsIdMergeEndpoint(client, parent_endpoint=self)) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Ticket]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Ticket]: """ Performs a GET request against the /service/tickets/{id} endpoint and returns an initialized PaginatedResponse object. @@ -69,7 +112,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Ticket: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Ticket: """ Performs a GET request against the /service/tickets/{id} endpoint. @@ -79,9 +124,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: Ticket: The parsed response data. """ - return self._parse_one(Ticket, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Ticket, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/tickets/{id} endpoint. @@ -91,9 +140,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Ticket: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Ticket: """ Performs a PUT request against the /service/tickets/{id} endpoint. @@ -103,9 +157,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: Ticket: The parsed response data. """ - return self._parse_one(Ticket, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Ticket, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Ticket: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Ticket: """ Performs a PATCH request against the /service/tickets/{id} endpoint. @@ -115,4 +173,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Ticket: The parsed response data. """ - return self._parse_one(Ticket, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Ticket, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdInfoEndpoint.py index 41635ea9d..73def8c20 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdInfoEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TicketInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TicketInfo]: """ Performs a GET request against the /service/tickets/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketInfo: """ Performs a GET request against the /service/tickets/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TicketInfo: The parsed response data. """ - return self._parse_one(TicketInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TicketInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdMergeEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdMergeEndpoint.py index 28f224f03..f2a2b0652 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdMergeEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdMergeEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdMergeEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "merge", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /service/tickets/{id}/merge endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesCountEndpoint.py index 0977e6d13..e90fbecf9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdNotesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/{id}/notes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/{id}/notes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesEndpoint.py index 936334163..c6be47313 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdNotesCountEndpoint import ServiceTicketsIdNotesCountEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdNotesIdEndpoint import ServiceTicketsIdNotesIdEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsIdNotesCountEndpoint import ( + ServiceTicketsIdNotesCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdNotesIdEndpoint import ( + ServiceTicketsIdNotesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceNote from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceTicketsIdNotesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "notes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceTicketsIdNotesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTicketsIdNotesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceTicketsIdNotesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceTicketsIdNotesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ServiceNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ServiceNote]: """ Performs a GET request against the /service/tickets/{id}/notes endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceNote]: """ Performs a GET request against the /service/tickets/{id}/notes endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceNote]: The parsed response data. """ - return self._parse_many(ServiceNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceNote, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceNote: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceNote: """ Performs a POST request against the /service/tickets/{id}/notes endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceNote: The parsed response data. """ - return self._parse_one(ServiceNote, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ServiceNote, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesIdEndpoint.py index a0f7c32fe..73b90efcd 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdNotesIdEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdNotesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ServiceNote]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ServiceNote]: """ Performs a GET request against the /service/tickets/{id}/notes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceNote: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceNote: """ Performs a GET request against the /service/tickets/{id}/notes/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceNote: The parsed response data. """ - return self._parse_one(ServiceNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceNote, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/tickets/{id}/notes/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceNote: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceNote: """ Performs a PUT request against the /service/tickets/{id}/notes/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceNote: The parsed response data. """ - return self._parse_one(ServiceNote, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ServiceNote, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceNote: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceNote: """ Performs a PATCH request against the /service/tickets/{id}/notes/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ServiceNote: The parsed response data. """ - return self._parse_one(ServiceNote, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ServiceNote, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdProductsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdProductsCountEndpoint.py index 0b4e445dc..7a135a79a 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdProductsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdProductsCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdProductsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/{id}/products/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/{id}/products/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdProductsEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdProductsEndpoint.py index 366db0ed2..5ac692273 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdProductsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdProductsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdProductsCountEndpoint import ServiceTicketsIdProductsCountEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsIdProductsCountEndpoint import ( + ServiceTicketsIdProductsCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ProductReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class ServiceTicketsIdProductsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "products", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceTicketsIdProductsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTicketsIdProductsCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ProductReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ProductReference]: """ Performs a GET request against the /service/tickets/{id}/products endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ProductReference]: The parsed response data. """ - return self._parse_many(ProductReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ProductReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdScheduleentriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdScheduleentriesCountEndpoint.py index d4d36326e..6e93d80d9 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdScheduleentriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdScheduleentriesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdScheduleentriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/{id}/scheduleentries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/{id}/scheduleentries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdScheduleentriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdScheduleentriesEndpoint.py index 21e885e6b..3aea2c545 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdScheduleentriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdScheduleentriesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdScheduleentriesCountEndpoint import \ - ServiceTicketsIdScheduleentriesCountEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsIdScheduleentriesCountEndpoint import ( + ServiceTicketsIdScheduleentriesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleEntryReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleEntryReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleEntryReference]: """ Performs a GET request against the /service/tickets/{id}/scheduleentries endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleEntryReference]: The parsed response data. """ - return self._parse_many(ScheduleEntryReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleEntryReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksCountEndpoint.py index fcdc5d024..d7bf82d8c 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdTasksCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/{id}/tasks/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/{id}/tasks/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksEndpoint.py index 1c6136f22..0bad1d1f5 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdTasksCountEndpoint import ServiceTicketsIdTasksCountEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdTasksIdEndpoint import ServiceTicketsIdTasksIdEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsIdTasksCountEndpoint import ( + ServiceTicketsIdTasksCountEndpoint, +) +from pyconnectwise.endpoints.manage.ServiceTicketsIdTasksIdEndpoint import ( + ServiceTicketsIdTasksIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Task from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class ServiceTicketsIdTasksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tasks", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceTicketsIdTasksCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTicketsIdTasksCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> ServiceTicketsIdTasksIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> ServiceTicketsIdTasksIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Task]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Task]: """ Performs a GET request against the /service/tickets/{id}/tasks endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Task]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Task]: """ Performs a GET request against the /service/tickets/{id}/tasks endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Task]: The parsed response data. """ - return self._parse_many(Task, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Task, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Task: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Task: """ Performs a POST request against the /service/tickets/{id}/tasks endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Task: The parsed response data. """ - return self._parse_one(Task, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Task, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksIdEndpoint.py index 146bc61ba..dfc064afd 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTasksIdEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdTasksIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Task]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Task]: """ Performs a GET request against the /service/tickets/{id}/tasks/{id} endpoint and returns an initialized PaginatedResponse object. @@ -41,9 +43,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: Task: The parsed response data. """ - return self._parse_one(Task, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Task, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /service/tickets/{id}/tasks/{id} endpoint. @@ -53,7 +59,10 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Task: """ @@ -65,9 +74,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: Task: The parsed response data. """ - return self._parse_one(Task, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Task, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Task: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Task: """ Performs a PATCH request against the /service/tickets/{id}/tasks/{id} endpoint. @@ -77,4 +90,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Task: The parsed response data. """ - return self._parse_one(Task, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Task, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTimeentriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTimeentriesCountEndpoint.py index f0bbe06fe..b9cc088da 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTimeentriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTimeentriesCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsIdTimeentriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/{id}/timeentries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/{id}/timeentries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTimeentriesEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTimeentriesEndpoint.py index 641ab5b9d..e99c194f2 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTimeentriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsIdTimeentriesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsIdTimeentriesCountEndpoint import \ - ServiceTicketsIdTimeentriesCountEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsIdTimeentriesCountEndpoint import ( + ServiceTicketsIdTimeentriesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeEntryReference from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeEntryReference]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeEntryReference]: """ Performs a GET request against the /service/tickets/{id}/timeentries endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeEntryReference]: The parsed response data. """ - return self._parse_many(TimeEntryReference, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeEntryReference, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsInfoCountEndpoint.py index 8eb6968d7..e90425515 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /service/tickets/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /service/tickets/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsInfoEndpoint.py index 8ffc08c23..a2b56b198 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.ServiceTicketsInfoCountEndpoint import ServiceTicketsInfoCountEndpoint +from pyconnectwise.endpoints.manage.ServiceTicketsInfoCountEndpoint import ( + ServiceTicketsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TicketInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class ServiceTicketsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(ServiceTicketsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + ServiceTicketsInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TicketInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TicketInfo]: """ Performs a GET request against the /service/tickets/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TicketInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TicketInfo]: """ Performs a GET request against the /service/tickets/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TicketInfo]: The parsed response data. """ - return self._parse_many(TicketInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TicketInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/ServiceTicketsSearchEndpoint.py b/src/pyconnectwise/endpoints/manage/ServiceTicketsSearchEndpoint.py index 0497aff0a..569899a50 100644 --- a/src/pyconnectwise/endpoints/manage/ServiceTicketsSearchEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/ServiceTicketsSearchEndpoint.py @@ -10,7 +10,9 @@ class ServiceTicketsSearchEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "search", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Ticket]: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Ticket]: """ Performs a POST request against the /service/tickets/search endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: list[Ticket]: The parsed response data. """ - return self._parse_many(Ticket, super()._make_request("POST", data=data, params=params).json()) + return self._parse_many( + Ticket, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAllowedfiletypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAllowedfiletypesCountEndpoint.py index 3d004b6c7..a9c86cb52 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAllowedfiletypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAllowedfiletypesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemAllowedfiletypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/allowedfiletypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/allowedfiletypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAllowedfiletypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAllowedfiletypesIdEndpoint.py index e23bb40b5..060bdd5e4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAllowedfiletypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAllowedfiletypesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AllowedFileType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AllowedFileType: """ Performs a GET request against the /system/allowedfiletypes/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AllowedFileType: The parsed response data. """ - return self._parse_one(AllowedFileType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AllowedFileType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/allowedfiletypes/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AllowedFileType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AllowedFileType: """ Performs a PUT request against the /system/allowedfiletypes/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AllowedFileType: The parsed response data. """ - return self._parse_one(AllowedFileType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AllowedFileType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AllowedFileType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AllowedFileType: """ Performs a PATCH request against the /system/allowedfiletypes/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AllowedFileType: The parsed response data. """ - return self._parse_one(AllowedFileType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AllowedFileType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsCountEndpoint.py index 94a50fd4f..96bb1662b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemAllowedoriginsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/allowedorigins/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/allowedorigins/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsEndpoint.py index 51d159a15..53c826475 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemAllowedoriginsCountEndpoint import SystemAllowedoriginsCountEndpoint -from pyconnectwise.endpoints.manage.SystemAllowedoriginsIdEndpoint import SystemAllowedoriginsIdEndpoint +from pyconnectwise.endpoints.manage.SystemAllowedoriginsCountEndpoint import ( + SystemAllowedoriginsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemAllowedoriginsIdEndpoint import ( + SystemAllowedoriginsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AllowedOrigin from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemAllowedoriginsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "allowedorigins", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemAllowedoriginsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemAllowedoriginsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemAllowedoriginsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AllowedOrigin]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AllowedOrigin]: """ Performs a GET request against the /system/allowedorigins endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AllowedOrigin]: The parsed response data. """ - return self._parse_many(AllowedOrigin, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AllowedOrigin, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AllowedOrigin: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AllowedOrigin: """ Performs a POST request against the /system/allowedorigins endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AllowedOrigin: The parsed response data. """ - return self._parse_one(AllowedOrigin, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AllowedOrigin, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsIdEndpoint.py index a49af4423..b028a9949 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAllowedoriginsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AllowedOrigin: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AllowedOrigin: """ Performs a GET request against the /system/allowedorigins/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AllowedOrigin: The parsed response data. """ - return self._parse_one(AllowedOrigin, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AllowedOrigin, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/allowedorigins/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AllowedOrigin: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AllowedOrigin: """ Performs a PUT request against the /system/allowedorigins/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AllowedOrigin: The parsed response data. """ - return self._parse_one(AllowedOrigin, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AllowedOrigin, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AllowedOrigin: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AllowedOrigin: """ Performs a PATCH request against the /system/allowedorigins/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AllowedOrigin: The parsed response data. """ - return self._parse_one(AllowedOrigin, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AllowedOrigin, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemApiMembersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemApiMembersCountEndpoint.py index a17f52462..9c357a360 100644 --- a/src/pyconnectwise/endpoints/manage/SystemApiMembersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemApiMembersCountEndpoint.py @@ -10,7 +10,9 @@ class SystemApimembersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/apiMembers/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/apiMembers/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemApiMembersDefaultEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemApiMembersDefaultEndpoint.py index 73b743152..8b5f29828 100644 --- a/src/pyconnectwise/endpoints/manage/SystemApiMembersDefaultEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemApiMembersDefaultEndpoint.py @@ -10,7 +10,9 @@ class SystemApimembersDefaultEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "default", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ApiMember]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ApiMember]: """ Performs a GET request against the /system/apiMembers/default endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ApiMember: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ApiMember: """ Performs a GET request against the /system/apiMembers/default endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ApiMember: The parsed response data. """ - return self._parse_one(ApiMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ApiMember, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemApiMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemApiMembersEndpoint.py index 3e11281e4..6a2e110d4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemApiMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemApiMembersEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemApimembersCountEndpoint import SystemApimembersCountEndpoint -from pyconnectwise.endpoints.manage.SystemApimembersDefaultEndpoint import SystemApimembersDefaultEndpoint -from pyconnectwise.endpoints.manage.SystemApimembersIdEndpoint import SystemApimembersIdEndpoint +from pyconnectwise.endpoints.manage.SystemApimembersCountEndpoint import ( + SystemApimembersCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemApimembersDefaultEndpoint import ( + SystemApimembersDefaultEndpoint, +) +from pyconnectwise.endpoints.manage.SystemApimembersIdEndpoint import ( + SystemApimembersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ApiMember from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemApimembersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "apiMembers", parent_endpoint=parent_endpoint) - self.default = self._register_child_endpoint(SystemApimembersDefaultEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemApimembersCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemApimembersCountEndpoint(client, parent_endpoint=self) + ) + self.default = self._register_child_endpoint( + SystemApimembersDefaultEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemApimembersIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> SystemApimembersIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ApiMember]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ApiMember]: """ Performs a GET request against the /system/apiMembers endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ApiMember]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ApiMember]: """ Performs a GET request against the /system/apiMembers endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ApiMember]: The parsed response data. """ - return self._parse_many(ApiMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ApiMember, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ApiMember: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ApiMember: """ Performs a POST request against the /system/apiMembers endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ApiMember: The parsed response data. """ - return self._parse_one(ApiMember, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ApiMember, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemApiMembersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemApiMembersIdEndpoint.py index 3d88f4eb4..ff4d75061 100644 --- a/src/pyconnectwise/endpoints/manage/SystemApiMembersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemApiMembersIdEndpoint.py @@ -10,7 +10,9 @@ class SystemApimembersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ApiMember]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ApiMember]: """ Performs a GET request against the /system/apiMembers/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ApiMember: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ApiMember: """ Performs a GET request against the /system/apiMembers/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ApiMember: The parsed response data. """ - return self._parse_one(ApiMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ApiMember, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ApiMember: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ApiMember: """ Performs a PUT request against the /system/apiMembers/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ApiMember: The parsed response data. """ - return self._parse_one(ApiMember, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ApiMember, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ApiMember: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ApiMember: """ Performs a PATCH request against the /system/apiMembers/{id} endpoint. @@ -65,4 +77,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ApiMember: The parsed response data. """ - return self._parse_one(ApiMember, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ApiMember, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAudittrailCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAudittrailCountEndpoint.py index d35409579..38e3a1319 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAudittrailCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAudittrailCountEndpoint.py @@ -10,7 +10,9 @@ class SystemAudittrailCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/audittrail/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/audittrail/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAudittrailEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAudittrailEndpoint.py index 56ec1ada7..9174500ce 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAudittrailEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAudittrailEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemAudittrailCountEndpoint import SystemAudittrailCountEndpoint +from pyconnectwise.endpoints.manage.SystemAudittrailCountEndpoint import ( + SystemAudittrailCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AuditTrailEntry from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemAudittrailEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "audittrail", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemAudittrailCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemAudittrailCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AuditTrailEntry]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AuditTrailEntry]: """ Performs a GET request against the /system/audittrail endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AuditTrailEntry]: The parsed response data. """ - return self._parse_many(AuditTrailEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AuditTrailEntry, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsCountEndpoint.py index ae422f918..9488110ff 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemAuthanvilsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/authAnvils/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/authAnvils/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsEndpoint.py index 5eaf2ae06..e7e2f148f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemAuthanvilsCountEndpoint import SystemAuthanvilsCountEndpoint -from pyconnectwise.endpoints.manage.SystemAuthanvilsIdEndpoint import SystemAuthanvilsIdEndpoint -from pyconnectwise.endpoints.manage.SystemAuthanvilsTestconnectionEndpoint import SystemAuthanvilsTestconnectionEndpoint +from pyconnectwise.endpoints.manage.SystemAuthanvilsCountEndpoint import ( + SystemAuthanvilsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemAuthanvilsIdEndpoint import ( + SystemAuthanvilsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemAuthanvilsTestconnectionEndpoint import ( + SystemAuthanvilsTestconnectionEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AuthAnvil from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +19,9 @@ class SystemAuthanvilsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "authAnvils", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemAuthanvilsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemAuthanvilsCountEndpoint(client, parent_endpoint=self) + ) self.test_connection = self._register_child_endpoint( SystemAuthanvilsTestconnectionEndpoint(client, parent_endpoint=self) ) @@ -31,7 +39,9 @@ def id(self, id: int) -> SystemAuthanvilsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[AuthAnvil]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[AuthAnvil]: """ Performs a GET request against the /system/authAnvils endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AuthAnvil]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AuthAnvil]: """ Performs a GET request against the /system/authAnvils endpoint. @@ -62,4 +74,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AuthAnvil]: The parsed response data. """ - return self._parse_many(AuthAnvil, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AuthAnvil, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsIdEndpoint.py index a754cdcfc..78d889bcd 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsIdEndpoint.py @@ -10,7 +10,9 @@ class SystemAuthanvilsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[AuthAnvil]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[AuthAnvil]: """ Performs a GET request against the /system/authAnvils/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AuthAnvil: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AuthAnvil: """ Performs a GET request against the /system/authAnvils/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AuthAnvil: The parsed response data. """ - return self._parse_one(AuthAnvil, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AuthAnvil, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AuthAnvil: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AuthAnvil: """ Performs a PUT request against the /system/authAnvils/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AuthAnvil: The parsed response data. """ - return self._parse_one(AuthAnvil, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AuthAnvil, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AuthAnvil: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AuthAnvil: """ Performs a PATCH request against the /system/authAnvils/{id} endpoint. @@ -65,4 +77,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AuthAnvil: The parsed response data. """ - return self._parse_one(AuthAnvil, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AuthAnvil, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsTestConnectionEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsTestConnectionEndpoint.py index 12ca01441..75e895359 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsTestConnectionEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAuthAnvilsTestConnectionEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a GET request against the /system/authAnvils/testConnection endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeCountEndpoint.py index 313b57367..c3bb28bdf 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeCountEndpoint.py @@ -10,7 +10,9 @@ class SystemAutosynctimeCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/autoSyncTime/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/autoSyncTime/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeEndpoint.py index 1d07dc009..7dc20e5a1 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemAutosynctimeCountEndpoint import SystemAutosynctimeCountEndpoint -from pyconnectwise.endpoints.manage.SystemAutosynctimeIdEndpoint import SystemAutosynctimeIdEndpoint +from pyconnectwise.endpoints.manage.SystemAutosynctimeCountEndpoint import ( + SystemAutosynctimeCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemAutosynctimeIdEndpoint import ( + SystemAutosynctimeIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import AutoSyncTime from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemAutosynctimeEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "autoSyncTime", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemAutosynctimeCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemAutosynctimeCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemAutosynctimeIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[AutoSyncTime]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[AutoSyncTime]: """ Performs a GET request against the /system/autoSyncTime endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[AutoSyncTime]: The parsed response data. """ - return self._parse_many(AutoSyncTime, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + AutoSyncTime, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AutoSyncTime: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AutoSyncTime: """ Performs a POST request against the /system/autoSyncTime endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AutoSyncTime: The parsed response data. """ - return self._parse_one(AutoSyncTime, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + AutoSyncTime, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeIdEndpoint.py index 1b060954b..e60cbeaf2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemAutoSyncTimeIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AutoSyncTime: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AutoSyncTime: """ Performs a GET request against the /system/autoSyncTime/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AutoSyncTime: The parsed response data. """ - return self._parse_one(AutoSyncTime, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + AutoSyncTime, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/autoSyncTime/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AutoSyncTime: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AutoSyncTime: """ Performs a PUT request against the /system/autoSyncTime/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: AutoSyncTime: The parsed response data. """ - return self._parse_one(AutoSyncTime, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + AutoSyncTime, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> AutoSyncTime: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> AutoSyncTime: """ Performs a PATCH request against the /system/autoSyncTime/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: AutoSyncTime: The parsed response data. """ - return self._parse_one(AutoSyncTime, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + AutoSyncTime, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemBundlesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemBundlesCountEndpoint.py index 0de3ae330..b503f4103 100644 --- a/src/pyconnectwise/endpoints/manage/SystemBundlesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemBundlesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemBundlesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BundleResultsCollection: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BundleResultsCollection: """ Performs a POST request against the /system/bundles/count endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BundleResultsCollection: The parsed response data. """ - return self._parse_one(BundleResultsCollection, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BundleResultsCollection, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemBundlesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemBundlesEndpoint.py index 13d56963d..25286426a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemBundlesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemBundlesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemBundlesCountEndpoint import SystemBundlesCountEndpoint +from pyconnectwise.endpoints.manage.SystemBundlesCountEndpoint import ( + SystemBundlesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import BundleResultsCollection from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemBundlesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "bundles", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemBundlesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemBundlesCountEndpoint(client, parent_endpoint=self) + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BundleResultsCollection: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BundleResultsCollection: """ Performs a POST request against the /system/bundles endpoint. @@ -23,4 +29,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: BundleResultsCollection: The parsed response data. """ - return self._parse_one(BundleResultsCollection, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + BundleResultsCollection, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCallbacksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCallbacksCountEndpoint.py index be488d200..6dab72e07 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCallbacksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCallbacksCountEndpoint.py @@ -10,7 +10,9 @@ class SystemCallbacksCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/callbacks/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/callbacks/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCallbacksEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCallbacksEndpoint.py index 48a67c5d0..f2ef7d760 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCallbacksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCallbacksEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemCallbacksCountEndpoint import SystemCallbacksCountEndpoint -from pyconnectwise.endpoints.manage.SystemCallbacksIdEndpoint import SystemCallbacksIdEndpoint +from pyconnectwise.endpoints.manage.SystemCallbacksCountEndpoint import ( + SystemCallbacksCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemCallbacksIdEndpoint import ( + SystemCallbacksIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CallbackEntry from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemCallbacksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "callbacks", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemCallbacksCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemCallbacksCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemCallbacksIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CallbackEntry]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CallbackEntry]: """ Performs a GET request against the /system/callbacks endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CallbackEntry]: The parsed response data. """ - return self._parse_many(CallbackEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CallbackEntry, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CallbackEntry: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CallbackEntry: """ Performs a POST request against the /system/callbacks endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CallbackEntry: The parsed response data. """ - return self._parse_one(CallbackEntry, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CallbackEntry, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCallbacksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCallbacksIdEndpoint.py index c721e7d96..c019868d9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCallbacksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCallbacksIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CallbackEntry: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CallbackEntry: """ Performs a GET request against the /system/callbacks/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CallbackEntry: The parsed response data. """ - return self._parse_one(CallbackEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CallbackEntry, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/callbacks/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CallbackEntry: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CallbackEntry: """ Performs a PUT request against the /system/callbacks/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CallbackEntry: The parsed response data. """ - return self._parse_one(CallbackEntry, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CallbackEntry, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CallbackEntry: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CallbackEntry: """ Performs a PATCH request against the /system/callbacks/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CallbackEntry: The parsed response data. """ - return self._parse_one(CallbackEntry, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CallbackEntry, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCertificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCertificationsCountEndpoint.py index 82f671874..86a1e7f10 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCertificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCertificationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemCertificationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/certifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/certifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCertificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCertificationsEndpoint.py index ffc2f6c99..c62a46df3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCertificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCertificationsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemCertificationsCountEndpoint import SystemCertificationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemCertificationsIdEndpoint import SystemCertificationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemCertificationsCountEndpoint import ( + SystemCertificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemCertificationsIdEndpoint import ( + SystemCertificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Certification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemCertificationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "certifications", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemCertificationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemCertificationsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemCertificationsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Certification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Certification]: """ Performs a GET request against the /system/certifications endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Certification]: The parsed response data. """ - return self._parse_many(Certification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Certification, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Certification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Certification: """ Performs a POST request against the /system/certifications endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Certification: The parsed response data. """ - return self._parse_one(Certification, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Certification, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCertificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCertificationsIdEndpoint.py index c38727360..2a7ced673 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCertificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCertificationsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemCertificationsIdUsagesEndpoint import SystemCertificationsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.SystemCertificationsIdUsagesEndpoint import ( + SystemCertificationsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Certification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemCertificationsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.usages = self._register_child_endpoint(SystemCertificationsIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + SystemCertificationsIdUsagesEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Certification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Certification: """ Performs a GET request against the /system/certifications/{id} endpoint. @@ -46,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Certification: The parsed response data. """ - return self._parse_one(Certification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Certification, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/certifications/{id} endpoint. @@ -58,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Certification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Certification: """ Performs a PUT request against the /system/certifications/{id} endpoint. @@ -70,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Certification: The parsed response data. """ - return self._parse_one(Certification, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Certification, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Certification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Certification: """ Performs a PATCH request against the /system/certifications/{id} endpoint. @@ -82,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Certification: The parsed response data. """ - return self._parse_one(Certification, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Certification, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCertificationsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCertificationsIdUsagesEndpoint.py index 6160dfa1f..6e3f67567 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCertificationsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCertificationsIdUsagesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemCertificationsIdUsagesListEndpoint import \ - SystemCertificationsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SystemCertificationsIdUsagesListEndpoint import ( + SystemCertificationsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): SystemCertificationsIdUsagesListEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /system/certifications/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -37,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /system/certifications/{id}/usages endpoint. @@ -47,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCertificationsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCertificationsIdUsagesListEndpoint.py index f59ab5208..84464be6e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCertificationsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCertificationsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SystemCertificationsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /system/certifications/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /system/certifications/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensCountEndpoint.py index 55a14995f..662b66365 100644 --- a/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensCountEndpoint.py @@ -10,7 +10,9 @@ class SystemConnectwisehostedscreensCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/connectWiseHostedScreens/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/connectWiseHostedScreens/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensEndpoint.py index d718e24a0..8091baf95 100644 --- a/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemConnectwisehostedscreensCountEndpoint import \ - SystemConnectwisehostedscreensCountEndpoint -from pyconnectwise.endpoints.manage.SystemConnectwisehostedscreensIdEndpoint import \ - SystemConnectwisehostedscreensIdEndpoint +from pyconnectwise.endpoints.manage.SystemConnectwisehostedscreensCountEndpoint import ( + SystemConnectwisehostedscreensCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemConnectwisehostedscreensIdEndpoint import ( + SystemConnectwisehostedscreensIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConnectWiseHostedScreen from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class SystemConnectwisehostedscreensEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "connectWiseHostedScreens", parent_endpoint=parent_endpoint) + super().__init__( + client, "connectWiseHostedScreens", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( SystemConnectwisehostedscreensCountEndpoint(client, parent_endpoint=self) @@ -27,7 +31,9 @@ def id(self, id: int) -> SystemConnectwisehostedscreensIdEndpoint: Returns: SystemConnectwisehostedscreensIdEndpoint: The initialized SystemConnectwisehostedscreensIdEndpoint object. """ - child = SystemConnectwisehostedscreensIdEndpoint(self.client, parent_endpoint=self) + child = SystemConnectwisehostedscreensIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConnectWiseHostedScreen]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConnectWiseHostedScreen]: """ Performs a GET request against the /system/connectWiseHostedScreens endpoint. @@ -64,4 +72,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ConnectWiseHostedScreen]: The parsed response data. """ - return self._parse_many(ConnectWiseHostedScreen, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ConnectWiseHostedScreen, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensIdEndpoint.py index 5c4342a7d..56246448d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemConnectWiseHostedScreensIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConnectWiseHostedScreen: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConnectWiseHostedScreen: """ Performs a GET request against the /system/connectWiseHostedScreens/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConnectWiseHostedScreen: The parsed response data. """ - return self._parse_one(ConnectWiseHostedScreen, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConnectWiseHostedScreen, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsCountEndpoint.py index 1461260a1..98aa22407 100644 --- a/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemConnectwisehostedsetupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/connectwisehostedsetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/connectwisehostedsetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsEndpoint.py index d6f6f253d..2433b0648 100644 --- a/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemConnectwisehostedsetupsCountEndpoint import \ - SystemConnectwisehostedsetupsCountEndpoint -from pyconnectwise.endpoints.manage.SystemConnectwisehostedsetupsIdEndpoint import \ - SystemConnectwisehostedsetupsIdEndpoint +from pyconnectwise.endpoints.manage.SystemConnectwisehostedsetupsCountEndpoint import ( + SystemConnectwisehostedsetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemConnectwisehostedsetupsIdEndpoint import ( + SystemConnectwisehostedsetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ConnectWiseHostedSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class SystemConnectwisehostedsetupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "connectwisehostedsetups", parent_endpoint=parent_endpoint) + super().__init__( + client, "connectwisehostedsetups", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( SystemConnectwisehostedsetupsCountEndpoint(client, parent_endpoint=self) @@ -27,7 +31,9 @@ def id(self, id: int) -> SystemConnectwisehostedsetupsIdEndpoint: Returns: SystemConnectwisehostedsetupsIdEndpoint: The initialized SystemConnectwisehostedsetupsIdEndpoint object. """ - child = SystemConnectwisehostedsetupsIdEndpoint(self.client, parent_endpoint=self) + child = SystemConnectwisehostedsetupsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ConnectWiseHostedSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ConnectWiseHostedSetup]: """ Performs a GET request against the /system/connectwisehostedsetups endpoint. @@ -64,9 +72,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ConnectWiseHostedSetup]: The parsed response data. """ - return self._parse_many(ConnectWiseHostedSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ConnectWiseHostedSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConnectWiseHostedSetup: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConnectWiseHostedSetup: """ Performs a POST request against the /system/connectwisehostedsetups endpoint. @@ -76,4 +89,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConnectWiseHostedSetup: The parsed response data. """ - return self._parse_one(ConnectWiseHostedSetup, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ConnectWiseHostedSetup, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsIdEndpoint.py index 9fea3649a..39dc85482 100644 --- a/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemConnectwisehostedsetupsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConnectWiseHostedSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConnectWiseHostedSetup: """ Performs a GET request against the /system/connectwisehostedsetups/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConnectWiseHostedSetup: The parsed response data. """ - return self._parse_one(ConnectWiseHostedSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ConnectWiseHostedSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/connectwisehostedsetups/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConnectWiseHostedSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConnectWiseHostedSetup: """ Performs a PUT request against the /system/connectwisehostedsetups/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ConnectWiseHostedSetup: The parsed response data. """ - return self._parse_one(ConnectWiseHostedSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ConnectWiseHostedSetup, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ConnectWiseHostedSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ConnectWiseHostedSetup: """ Performs a PATCH request against the /system/connectwisehostedsetups/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ConnectWiseHostedSetup: The parsed response data. """ - return self._parse_one(ConnectWiseHostedSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ConnectWiseHostedSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemContactsyncEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemContactsyncEndpoint.py index f93643d2b..943fa33a0 100644 --- a/src/pyconnectwise/endpoints/manage/SystemContactsyncEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemContactsyncEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringEndpoint import SystemContactsyncMonitoringEndpoint +from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringEndpoint import ( + SystemContactsyncMonitoringEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringCountEndpoint.py index 5c3c59589..548276d18 100644 --- a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringCountEndpoint.py @@ -10,7 +10,9 @@ class SystemContactsyncMonitoringCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/contactsync/monitoring/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/contactsync/monitoring/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringEndpoint.py index e65708e2e..05562d5fe 100644 --- a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringEndpoint.py @@ -1,13 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringCountEndpoint import \ - SystemContactsyncMonitoringCountEndpoint -from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringIdEndpoint import SystemContactsyncMonitoringIdEndpoint -from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringNotificationtypeEndpoint import \ - SystemContactsyncMonitoringNotificationtypeEndpoint -from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringTypeEndpoint import \ - SystemContactsyncMonitoringTypeEndpoint +from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringCountEndpoint import ( + SystemContactsyncMonitoringCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringIdEndpoint import ( + SystemContactsyncMonitoringIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringNotificationtypeEndpoint import ( + SystemContactsyncMonitoringNotificationtypeEndpoint, +) +from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringTypeEndpoint import ( + SystemContactsyncMonitoringTypeEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import M365ContactSyncMonitoring from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -18,12 +23,16 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "monitoring", parent_endpoint=parent_endpoint) self.notificationtype = self._register_child_endpoint( - SystemContactsyncMonitoringNotificationtypeEndpoint(client, parent_endpoint=self) + SystemContactsyncMonitoringNotificationtypeEndpoint( + client, parent_endpoint=self + ) + ) + self.type = self._register_child_endpoint( + SystemContactsyncMonitoringTypeEndpoint(client, parent_endpoint=self) ) self.count = self._register_child_endpoint( SystemContactsyncMonitoringCountEndpoint(client, parent_endpoint=self) ) - self.type = self._register_child_endpoint(SystemContactsyncMonitoringTypeEndpoint(client, parent_endpoint=self)) def id(self, id: int) -> SystemContactsyncMonitoringIdEndpoint: """ @@ -61,7 +70,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[M365ContactSyncMonitoring]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[M365ContactSyncMonitoring]: """ Performs a GET request against the /system/contactsync/monitoring endpoint. @@ -72,5 +83,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[M365ContactSyncMonitoring]: The parsed response data. """ return self._parse_many( - M365ContactSyncMonitoring, super()._make_request("GET", data=data, params=params).json() + M365ContactSyncMonitoring, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringIdEndpoint.py index d73196b47..1e047b324 100644 --- a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M365ContactSyncMonitoring: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> M365ContactSyncMonitoring: """ Performs a GET request against the /system/contactsync/monitoring/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: M365ContactSyncMonitoring: The parsed response data. """ - return self._parse_one(M365ContactSyncMonitoring, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + M365ContactSyncMonitoring, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringTypeEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringTypeEndpoint.py index 2b19bc752..a4f5b786b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringTypeEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringTypeEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringTypeIdEndpoint import \ - SystemContactsyncMonitoringTypeIdEndpoint +from pyconnectwise.endpoints.manage.SystemContactsyncMonitoringTypeIdEndpoint import ( + SystemContactsyncMonitoringTypeIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> SystemContactsyncMonitoringTypeIdEndpoint: Returns: SystemContactsyncMonitoringTypeIdEndpoint: The initialized SystemContactsyncMonitoringTypeIdEndpoint object. """ - child = SystemContactsyncMonitoringTypeIdEndpoint(self.client, parent_endpoint=self) + child = SystemContactsyncMonitoringTypeIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringTypeIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringTypeIdEndpoint.py index b830f3b3a..d074c4db6 100644 --- a/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringTypeIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemContactsyncMonitoringTypeIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M365ContactSyncMonitoring: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> M365ContactSyncMonitoring: """ Performs a GET request against the /system/contactsync/monitoring/type/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: M365ContactSyncMonitoring: The parsed response data. """ - return self._parse_one(M365ContactSyncMonitoring, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + M365ContactSyncMonitoring, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/contactsync/monitoring/type/{id} endpoint. @@ -55,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCustomReportsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCustomReportsCountEndpoint.py index d25190661..e871ca83e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCustomReportsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCustomReportsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemCustomreportsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/customReports/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/customReports/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCustomReportsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCustomReportsEndpoint.py index 6e3bf432d..caaed5254 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCustomReportsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCustomReportsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemCustomreportsCountEndpoint import SystemCustomreportsCountEndpoint -from pyconnectwise.endpoints.manage.SystemCustomreportsIdEndpoint import SystemCustomreportsIdEndpoint +from pyconnectwise.endpoints.manage.SystemCustomreportsCountEndpoint import ( + SystemCustomreportsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemCustomreportsIdEndpoint import ( + SystemCustomreportsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CustomReport from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemCustomreportsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "customReports", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemCustomreportsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemCustomreportsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemCustomreportsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CustomReport]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CustomReport]: """ Performs a GET request against the /system/customReports endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CustomReport]: The parsed response data. """ - return self._parse_many(CustomReport, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CustomReport, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CustomReport: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CustomReport: """ Performs a POST request against the /system/customReports endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CustomReport: The parsed response data. """ - return self._parse_one(CustomReport, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CustomReport, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdEndpoint.py index 580d14fa0..4b00f0a60 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemCustomreportsIdParametersEndpoint import \ - SystemCustomreportsIdParametersEndpoint +from pyconnectwise.endpoints.manage.SystemCustomreportsIdParametersEndpoint import ( + SystemCustomreportsIdParametersEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CustomReport from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CustomReport: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CustomReport: """ Performs a GET request against the /system/customReports/{id} endpoint. @@ -49,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CustomReport: The parsed response data. """ - return self._parse_one(CustomReport, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CustomReport, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/customReports/{id} endpoint. @@ -61,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CustomReport: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CustomReport: """ Performs a PUT request against the /system/customReports/{id} endpoint. @@ -73,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CustomReport: The parsed response data. """ - return self._parse_one(CustomReport, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CustomReport, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CustomReport: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CustomReport: """ Performs a PATCH request against the /system/customReports/{id} endpoint. @@ -85,4 +101,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CustomReport: The parsed response data. """ - return self._parse_one(CustomReport, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CustomReport, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersCountEndpoint.py index 6288af8d8..92b024515 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersCountEndpoint.py @@ -10,7 +10,9 @@ class SystemCustomreportsIdParametersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/customReports/{id}/parameters/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/customReports/{id}/parameters/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersEndpoint.py index 587bccdad..e2aea244c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemCustomreportsIdParametersCountEndpoint import \ - SystemCustomreportsIdParametersCountEndpoint -from pyconnectwise.endpoints.manage.SystemCustomreportsIdParametersIdEndpoint import \ - SystemCustomreportsIdParametersIdEndpoint +from pyconnectwise.endpoints.manage.SystemCustomreportsIdParametersCountEndpoint import ( + SystemCustomreportsIdParametersCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemCustomreportsIdParametersIdEndpoint import ( + SystemCustomreportsIdParametersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CustomReportParameter from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> SystemCustomreportsIdParametersIdEndpoint: Returns: SystemCustomreportsIdParametersIdEndpoint: The initialized SystemCustomreportsIdParametersIdEndpoint object. """ - child = SystemCustomreportsIdParametersIdEndpoint(self.client, parent_endpoint=self) + child = SystemCustomreportsIdParametersIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CustomReportParameter]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CustomReportParameter]: """ Performs a GET request against the /system/customReports/{id}/parameters endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CustomReportParameter]: The parsed response data. """ - return self._parse_many(CustomReportParameter, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CustomReportParameter, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CustomReportParameter: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CustomReportParameter: """ Performs a POST request against the /system/customReports/{id}/parameters endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CustomReportParameter: The parsed response data. """ - return self._parse_one(CustomReportParameter, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + CustomReportParameter, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersIdEndpoint.py index d350c6bc7..2a49c7332 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCustomReportsIdParametersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CustomReportParameter: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CustomReportParameter: """ Performs a GET request against the /system/customReports/{id}/parameters/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CustomReportParameter: The parsed response data. """ - return self._parse_one(CustomReportParameter, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CustomReportParameter, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/customReports/{id}/parameters/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CustomReportParameter: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CustomReportParameter: """ Performs a PUT request against the /system/customReports/{id}/parameters/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CustomReportParameter: The parsed response data. """ - return self._parse_one(CustomReportParameter, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CustomReportParameter, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CustomReportParameter: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CustomReportParameter: """ Performs a PATCH request against the /system/customReports/{id}/parameters/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CustomReportParameter: The parsed response data. """ - return self._parse_one(CustomReportParameter, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CustomReportParameter, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesCountEndpoint.py index 7cf6f4be2..fef2bf313 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemCwtimezonesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/cwTimeZones/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/cwTimeZones/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesEndpoint.py index 33ea80d4d..188a0c5ff 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemCwtimezonesCountEndpoint import SystemCwtimezonesCountEndpoint -from pyconnectwise.endpoints.manage.SystemCwtimezonesIdEndpoint import SystemCwtimezonesIdEndpoint +from pyconnectwise.endpoints.manage.SystemCwtimezonesCountEndpoint import ( + SystemCwtimezonesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemCwtimezonesIdEndpoint import ( + SystemCwtimezonesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CwTimeZone from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemCwtimezonesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "cwTimeZones", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemCwtimezonesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemCwtimezonesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemCwtimezonesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemCwtimezonesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CwTimeZone]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CwTimeZone]: """ Performs a GET request against the /system/cwTimeZones endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CwTimeZone]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CwTimeZone]: """ Performs a GET request against the /system/cwTimeZones endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CwTimeZone]: The parsed response data. """ - return self._parse_many(CwTimeZone, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CwTimeZone, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesIdEndpoint.py index 7a0222217..d6d28b491 100644 --- a/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemCwTimeZonesIdEndpoint.py @@ -10,7 +10,9 @@ class SystemCwtimezonesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CwTimeZone]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CwTimeZone]: """ Performs a GET request against the /system/cwTimeZones/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CwTimeZone: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CwTimeZone: """ Performs a GET request against the /system/cwTimeZones/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CwTimeZone: The parsed response data. """ - return self._parse_one(CwTimeZone, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CwTimeZone, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDepartmentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDepartmentsCountEndpoint.py index 8ad74dd15..10d29c6be 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDepartmentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDepartmentsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemDepartmentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/departments/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/departments/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDepartmentsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDepartmentsEndpoint.py index e8907009b..c840454e1 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDepartmentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDepartmentsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDepartmentsCountEndpoint import SystemDepartmentsCountEndpoint -from pyconnectwise.endpoints.manage.SystemDepartmentsIdEndpoint import SystemDepartmentsIdEndpoint +from pyconnectwise.endpoints.manage.SystemDepartmentsCountEndpoint import ( + SystemDepartmentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDepartmentsIdEndpoint import ( + SystemDepartmentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Department from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemDepartmentsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "departments", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemDepartmentsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemDepartmentsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemDepartmentsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemDepartmentsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Department]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Department]: """ Performs a GET request against the /system/departments endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Department]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Department]: """ Performs a GET request against the /system/departments endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Department]: The parsed response data. """ - return self._parse_many(Department, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Department, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Department: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Department: """ Performs a POST request against the /system/departments endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Department: The parsed response data. """ - return self._parse_one(Department, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Department, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdEndpoint.py index 7c8caf956..4de322857 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDepartmentsIdLocationsEndpoint import SystemDepartmentsIdLocationsEndpoint -from pyconnectwise.endpoints.manage.SystemDepartmentsIdUsagesEndpoint import SystemDepartmentsIdUsagesEndpoint +from pyconnectwise.endpoints.manage.SystemDepartmentsIdLocationsEndpoint import ( + SystemDepartmentsIdLocationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDepartmentsIdUsagesEndpoint import ( + SystemDepartmentsIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Department from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,12 +16,16 @@ class SystemDepartmentsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) + self.usages = self._register_child_endpoint( + SystemDepartmentsIdUsagesEndpoint(client, parent_endpoint=self) + ) self.locations = self._register_child_endpoint( SystemDepartmentsIdLocationsEndpoint(client, parent_endpoint=self) ) - self.usages = self._register_child_endpoint(SystemDepartmentsIdUsagesEndpoint(client, parent_endpoint=self)) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Department]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Department]: """ Performs a GET request against the /system/departments/{id} endpoint and returns an initialized PaginatedResponse object. @@ -38,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Department: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Department: """ Performs a GET request against the /system/departments/{id} endpoint. @@ -48,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: Department: The parsed response data. """ - return self._parse_one(Department, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Department, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/departments/{id} endpoint. @@ -60,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Department: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Department: """ Performs a PUT request against the /system/departments/{id} endpoint. @@ -72,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: Department: The parsed response data. """ - return self._parse_one(Department, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Department, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Department: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Department: """ Performs a PATCH request against the /system/departments/{id} endpoint. @@ -84,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Department: The parsed response data. """ - return self._parse_one(Department, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Department, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsCountEndpoint.py index 68b99fd02..01d42e32b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemDepartmentsIdLocationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/departments/{id}/locations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/departments/{id}/locations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsEndpoint.py index eed6a418e..8a7868470 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDepartmentsIdLocationsCountEndpoint import \ - SystemDepartmentsIdLocationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemDepartmentsIdLocationsIdEndpoint import SystemDepartmentsIdLocationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemDepartmentsIdLocationsCountEndpoint import ( + SystemDepartmentsIdLocationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDepartmentsIdLocationsIdEndpoint import ( + SystemDepartmentsIdLocationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DepartmentLocation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> SystemDepartmentsIdLocationsIdEndpoint: Returns: SystemDepartmentsIdLocationsIdEndpoint: The initialized SystemDepartmentsIdLocationsIdEndpoint object. """ - child = SystemDepartmentsIdLocationsIdEndpoint(self.client, parent_endpoint=self) + child = SystemDepartmentsIdLocationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DepartmentLocation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DepartmentLocation]: """ Performs a GET request against the /system/departments/{id}/locations endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DepartmentLocation]: The parsed response data. """ - return self._parse_many(DepartmentLocation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DepartmentLocation, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DepartmentLocation: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DepartmentLocation: """ Performs a POST request against the /system/departments/{id}/locations endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: DepartmentLocation: The parsed response data. """ - return self._parse_one(DepartmentLocation, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + DepartmentLocation, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsIdEndpoint.py index 259bb7e46..84c852444 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdLocationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DepartmentLocation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DepartmentLocation: """ Performs a GET request against the /system/departments/{id}/locations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DepartmentLocation: The parsed response data. """ - return self._parse_one(DepartmentLocation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DepartmentLocation, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/departments/{id}/locations/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DepartmentLocation: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DepartmentLocation: """ Performs a PUT request against the /system/departments/{id}/locations/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DepartmentLocation: The parsed response data. """ - return self._parse_one(DepartmentLocation, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + DepartmentLocation, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DepartmentLocation: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DepartmentLocation: """ Performs a PATCH request against the /system/departments/{id}/locations/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: DepartmentLocation: The parsed response data. """ - return self._parse_one(DepartmentLocation, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + DepartmentLocation, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdUsagesEndpoint.py index 915370066..12c0c77b3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDepartmentsIdUsagesListEndpoint import SystemDepartmentsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SystemDepartmentsIdUsagesListEndpoint import ( + SystemDepartmentsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemDepartmentsIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(SystemDepartmentsIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + SystemDepartmentsIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /system/departments/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /system/departments/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdUsagesListEndpoint.py index 179c5543b..55ee7878e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDepartmentsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SystemDepartmentsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /system/departments/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /system/departments/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsEndpoint.py index 352f2c8cf..2e933db8b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDirectionalsyncsIdEndpoint import SystemDirectionalsyncsIdEndpoint -from pyconnectwise.endpoints.manage.SystemDirectionalsyncsInfoEndpoint import SystemDirectionalsyncsInfoEndpoint +from pyconnectwise.endpoints.manage.SystemDirectionalsyncsIdEndpoint import ( + SystemDirectionalsyncsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDirectionalsyncsInfoEndpoint import ( + SystemDirectionalsyncsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class SystemDirectionalsyncsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "directionalSyncs", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemDirectionalsyncsInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemDirectionalsyncsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemDirectionalsyncsIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsIdEndpoint.py index cead84334..b1bd5fe3a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDirectionalsyncsIdInfoEndpoint import SystemDirectionalsyncsIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemDirectionalsyncsIdInfoEndpoint import ( + SystemDirectionalsyncsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class SystemDirectionalsyncsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemDirectionalsyncsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemDirectionalsyncsIdInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsIdInfoEndpoint.py index ed297f4f8..3c9bcab19 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DirectionalSyncInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DirectionalSyncInfo: """ Performs a GET request against the /system/directionalSyncs/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DirectionalSyncInfo: The parsed response data. """ - return self._parse_one(DirectionalSyncInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DirectionalSyncInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsInfoCountEndpoint.py index 767cc4b23..e84ac3c8c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemDirectionalsyncsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/directionalSyncs/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/directionalSyncs/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsInfoEndpoint.py index 77702499f..dec955b84 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDirectionalsyncsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDirectionalsyncsInfoCountEndpoint import \ - SystemDirectionalsyncsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemDirectionalsyncsInfoCountEndpoint import ( + SystemDirectionalsyncsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DirectionalSyncInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DirectionalSyncInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DirectionalSyncInfo]: """ Performs a GET request against the /system/directionalSyncs/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DirectionalSyncInfo]: The parsed response data. """ - return self._parse_many(DirectionalSyncInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DirectionalSyncInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDocumentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDocumentsCountEndpoint.py index 26ea28880..2f463e95b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDocumentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDocumentsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemDocumentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/documents/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/documents/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDocumentsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDocumentsEndpoint.py index f5acd63f8..4d8ffae2c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDocumentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDocumentsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDocumentsCountEndpoint import SystemDocumentsCountEndpoint -from pyconnectwise.endpoints.manage.SystemDocumentsIdEndpoint import SystemDocumentsIdEndpoint -from pyconnectwise.endpoints.manage.SystemDocumentsUploadsampleEndpoint import SystemDocumentsUploadsampleEndpoint +from pyconnectwise.endpoints.manage.SystemDocumentsCountEndpoint import ( + SystemDocumentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDocumentsIdEndpoint import ( + SystemDocumentsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDocumentsUploadsampleEndpoint import ( + SystemDocumentsUploadsampleEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DocumentInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +19,12 @@ class SystemDocumentsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "documents", parent_endpoint=parent_endpoint) + self.count = self._register_child_endpoint( + SystemDocumentsCountEndpoint(client, parent_endpoint=self) + ) self.uploadsample = self._register_child_endpoint( SystemDocumentsUploadsampleEndpoint(client, parent_endpoint=self) ) - self.count = self._register_child_endpoint(SystemDocumentsCountEndpoint(client, parent_endpoint=self)) def id(self, id: int) -> SystemDocumentsIdEndpoint: """ @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DocumentInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DocumentInfo]: """ Performs a GET request against the /system/documents endpoint. @@ -64,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DocumentInfo]: The parsed response data. """ - return self._parse_many(DocumentInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DocumentInfo, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DocumentInfo: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DocumentInfo: """ Performs a POST request against the /system/documents endpoint. @@ -76,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: DocumentInfo: The parsed response data. """ - return self._parse_one(DocumentInfo, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + DocumentInfo, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDocumentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDocumentsIdEndpoint.py index e29b1f43a..becc756e9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDocumentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDocumentsIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDocumentsIdDownloadEndpoint import SystemDocumentsIdDownloadEndpoint -from pyconnectwise.endpoints.manage.SystemDocumentsIdThumbnailEndpoint import SystemDocumentsIdThumbnailEndpoint +from pyconnectwise.endpoints.manage.SystemDocumentsIdDownloadEndpoint import ( + SystemDocumentsIdDownloadEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDocumentsIdThumbnailEndpoint import ( + SystemDocumentsIdThumbnailEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DocumentInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,8 +16,12 @@ class SystemDocumentsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.thumbnail = self._register_child_endpoint(SystemDocumentsIdThumbnailEndpoint(client, parent_endpoint=self)) - self.download = self._register_child_endpoint(SystemDocumentsIdDownloadEndpoint(client, parent_endpoint=self)) + self.thumbnail = self._register_child_endpoint( + SystemDocumentsIdThumbnailEndpoint(client, parent_endpoint=self) + ) + self.download = self._register_child_endpoint( + SystemDocumentsIdDownloadEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -38,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DocumentInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DocumentInfo: """ Performs a GET request against the /system/documents/{id} endpoint. @@ -48,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DocumentInfo: The parsed response data. """ - return self._parse_one(DocumentInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DocumentInfo, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/documents/{id} endpoint. @@ -60,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DocumentInfo: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DocumentInfo: """ Performs a POST request against the /system/documents/{id} endpoint. @@ -72,4 +91,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: DocumentInfo: The parsed response data. """ - return self._parse_one(DocumentInfo, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + DocumentInfo, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDocumentsUploadsampleEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDocumentsUploadsampleEndpoint.py index 42c18d261..80ecfde32 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDocumentsUploadsampleEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDocumentsUploadsampleEndpoint.py @@ -9,7 +9,9 @@ class SystemDocumentsUploadsampleEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "uploadsample", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a GET request against the /system/documents/uploadsample endpoint. @@ -19,4 +21,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesEndpoint.py index 91012d1d9..46561e583 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDocumenttypesIdEndpoint import SystemDocumenttypesIdEndpoint -from pyconnectwise.endpoints.manage.SystemDocumenttypesInfoEndpoint import SystemDocumenttypesInfoEndpoint +from pyconnectwise.endpoints.manage.SystemDocumenttypesIdEndpoint import ( + SystemDocumenttypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDocumenttypesInfoEndpoint import ( + SystemDocumenttypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class SystemDocumenttypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "documentTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemDocumenttypesInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemDocumenttypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemDocumenttypesIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesIdEndpoint.py index 7e0c702f8..712e8f87c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDocumenttypesIdInfoEndpoint import SystemDocumenttypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemDocumenttypesIdInfoEndpoint import ( + SystemDocumenttypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class SystemDocumenttypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemDocumenttypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemDocumenttypesIdInfoEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesIdInfoEndpoint.py index 39dc8e646..01c00a68f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DocumentType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DocumentType: """ Performs a GET request against the /system/documentTypes/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DocumentType: The parsed response data. """ - return self._parse_one(DocumentType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DocumentType, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesInfoCountEndpoint.py index e52ac4e69..3f1166d9a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemDocumenttypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/documentTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/documentTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesInfoEndpoint.py index 44cd95e9a..c8fb0de13 100644 --- a/src/pyconnectwise/endpoints/manage/SystemDocumenttypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemDocumenttypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemDocumenttypesInfoCountEndpoint import SystemDocumenttypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemDocumenttypesInfoCountEndpoint import ( + SystemDocumenttypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DocumentType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemDocumenttypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemDocumenttypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemDocumenttypesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DocumentType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DocumentType]: """ Performs a GET request against the /system/documentTypes/info endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DocumentType]: The parsed response data. """ - return self._parse_many(DocumentType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DocumentType, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsCountEndpoint.py index 60b926041..860cf2f40 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemEpayconfigurationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/ePayConfigurations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/ePayConfigurations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsEndpoint.py index 0f831acf9..e1f48ee9b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemEpayconfigurationsCountEndpoint import SystemEpayconfigurationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemEpayconfigurationsIdEndpoint import SystemEpayconfigurationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemEpayconfigurationsCountEndpoint import ( + SystemEpayconfigurationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEpayconfigurationsIdEndpoint import ( + SystemEpayconfigurationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EPayConfiguration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemEpayconfigurationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "ePayConfigurations", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemEpayconfigurationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemEpayconfigurationsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemEpayconfigurationsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EPayConfiguration]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EPayConfiguration]: """ Performs a GET request against the /system/ePayConfigurations endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EPayConfiguration]: The parsed response data. """ - return self._parse_many(EPayConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EPayConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EPayConfiguration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EPayConfiguration: """ Performs a POST request against the /system/ePayConfigurations endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: EPayConfiguration: The parsed response data. """ - return self._parse_one(EPayConfiguration, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + EPayConfiguration, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsIdEndpoint.py index 2988ad1ed..d60b4ca7b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEPayConfigurationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EPayConfiguration: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EPayConfiguration: """ Performs a GET request against the /system/ePayConfigurations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EPayConfiguration: The parsed response data. """ - return self._parse_one(EPayConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + EPayConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/ePayConfigurations/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EPayConfiguration: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EPayConfiguration: """ Performs a PUT request against the /system/ePayConfigurations/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EPayConfiguration: The parsed response data. """ - return self._parse_one(EPayConfiguration, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + EPayConfiguration, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EPayConfiguration: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EPayConfiguration: """ Performs a PATCH request against the /system/ePayConfigurations/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: EPayConfiguration: The parsed response data. """ - return self._parse_one(EPayConfiguration, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + EPayConfiguration, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsCountEndpoint.py index 1243e041d..c1af975de 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemEmailconnectorsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/emailConnectors/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/emailConnectors/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsEndpoint.py index f41ea86df..50ad018ae 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsCountEndpoint import SystemEmailconnectorsCountEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdEndpoint import SystemEmailconnectorsIdEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsInfoEndpoint import SystemEmailconnectorsInfoEndpoint +from pyconnectwise.endpoints.manage.SystemEmailconnectorsCountEndpoint import ( + SystemEmailconnectorsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdEndpoint import ( + SystemEmailconnectorsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailconnectorsInfoEndpoint import ( + SystemEmailconnectorsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EmailConnector from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemEmailconnectorsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "emailConnectors", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemEmailconnectorsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemEmailconnectorsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemEmailconnectorsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemEmailconnectorsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemEmailconnectorsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EmailConnector]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EmailConnector]: """ Performs a GET request against the /system/emailConnectors endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EmailConnector]: The parsed response data. """ - return self._parse_many(EmailConnector, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EmailConnector, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnector: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnector: """ Performs a POST request against the /system/emailConnectors endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: EmailConnector: The parsed response data. """ - return self._parse_one(EmailConnector, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + EmailConnector, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdEndpoint.py index e30f8adf3..23cc47308 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdInfoEndpoint import SystemEmailconnectorsIdInfoEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesEndpoint import \ - SystemEmailconnectorsIdParsingstylesEndpoint +from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdInfoEndpoint import ( + SystemEmailconnectorsIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesEndpoint import ( + SystemEmailconnectorsIdParsingstylesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EmailConnector from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +16,9 @@ class SystemEmailconnectorsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemEmailconnectorsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemEmailconnectorsIdInfoEndpoint(client, parent_endpoint=self) + ) self.parsing_styles = self._register_child_endpoint( SystemEmailconnectorsIdParsingstylesEndpoint(client, parent_endpoint=self) ) @@ -41,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnector: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnector: """ Performs a GET request against the /system/emailConnectors/{id} endpoint. @@ -51,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailConnector: The parsed response data. """ - return self._parse_one(EmailConnector, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + EmailConnector, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/emailConnectors/{id} endpoint. @@ -63,9 +75,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnector: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnector: """ Performs a PUT request against the /system/emailConnectors/{id} endpoint. @@ -75,9 +92,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailConnector: The parsed response data. """ - return self._parse_one(EmailConnector, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + EmailConnector, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnector: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnector: """ Performs a PATCH request against the /system/emailConnectors/{id} endpoint. @@ -87,4 +109,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: EmailConnector: The parsed response data. """ - return self._parse_one(EmailConnector, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + EmailConnector, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdInfoEndpoint.py index ad484c070..a10472e13 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnectorInfo: """ Performs a GET request against the /system/emailConnectors/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailConnectorInfo: The parsed response data. """ - return self._parse_one(EmailConnectorInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + EmailConnectorInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesCountEndpoint.py index 03e5b5e3f..e8f535fbf 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemEmailconnectorsIdParsingstylesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/emailConnectors/{id}/parsingStyles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/emailConnectors/{id}/parsingStyles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesEndpoint.py index 42301bd41..18343351d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesCountEndpoint import \ - SystemEmailconnectorsIdParsingstylesCountEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesIdEndpoint import \ - SystemEmailconnectorsIdParsingstylesIdEndpoint +from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesCountEndpoint import ( + SystemEmailconnectorsIdParsingstylesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesIdEndpoint import ( + SystemEmailconnectorsIdParsingstylesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EmailConnectorParsingStyle from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "parsingStyles", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - SystemEmailconnectorsIdParsingstylesCountEndpoint(client, parent_endpoint=self) + SystemEmailconnectorsIdParsingstylesCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> SystemEmailconnectorsIdParsingstylesIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> SystemEmailconnectorsIdParsingstylesIdEndpoint: Returns: SystemEmailconnectorsIdParsingstylesIdEndpoint: The initialized SystemEmailconnectorsIdParsingstylesIdEndpoint object. """ - child = SystemEmailconnectorsIdParsingstylesIdEndpoint(self.client, parent_endpoint=self) + child = SystemEmailconnectorsIdParsingstylesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EmailConnectorParsingStyle]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EmailConnectorParsingStyle]: """ Performs a GET request against the /system/emailConnectors/{id}/parsingStyles endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[EmailConnectorParsingStyle]: The parsed response data. """ return self._parse_many( - EmailConnectorParsingStyle, super()._make_request("GET", data=data, params=params).json() + EmailConnectorParsingStyle, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingStyle: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnectorParsingStyle: """ Performs a POST request against the /system/emailConnectors/{id}/parsingStyles endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingStyle: The parsed response data. """ return self._parse_one( - EmailConnectorParsingStyle, super()._make_request("POST", data=data, params=params).json() + EmailConnectorParsingStyle, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdEndpoint.py index de30b8d51..0d98b8c67 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesIdParsingrulesEndpoint import \ - SystemEmailconnectorsIdParsingstylesIdParsingrulesEndpoint +from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesIdParsingrulesEndpoint import ( + SystemEmailconnectorsIdParsingstylesIdParsingrulesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EmailConnectorParsingStyle from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.parsing_rules = self._register_child_endpoint( - SystemEmailconnectorsIdParsingstylesIdParsingrulesEndpoint(client, parent_endpoint=self) + SystemEmailconnectorsIdParsingstylesIdParsingrulesEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingStyle: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnectorParsingStyle: """ Performs a GET request against the /system/emailConnectors/{id}/parsingStyles/{id} endpoint. @@ -50,10 +55,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E EmailConnectorParsingStyle: The parsed response data. """ return self._parse_one( - EmailConnectorParsingStyle, super()._make_request("GET", data=data, params=params).json() + EmailConnectorParsingStyle, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/emailConnectors/{id}/parsingStyles/{id} endpoint. @@ -63,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingStyle: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnectorParsingStyle: """ Performs a PUT request against the /system/emailConnectors/{id}/parsingStyles/{id} endpoint. @@ -76,10 +89,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E EmailConnectorParsingStyle: The parsed response data. """ return self._parse_one( - EmailConnectorParsingStyle, super()._make_request("PUT", data=data, params=params).json() + EmailConnectorParsingStyle, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingStyle: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnectorParsingStyle: """ Performs a PATCH request against the /system/emailConnectors/{id}/parsingStyles/{id} endpoint. @@ -90,5 +106,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingStyle: The parsed response data. """ return self._parse_one( - EmailConnectorParsingStyle, super()._make_request("PATCH", data=data, params=params).json() + EmailConnectorParsingStyle, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesCountEndpoint.py index 75b96f23e..63881f05f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesCountEndpoint.py @@ -6,11 +6,15 @@ from pyconnectwise.responses.paginated_response import PaginatedResponse -class SystemEmailconnectorsIdParsingstylesIdParsingrulesCountEndpoint(ConnectWiseEndpoint): +class SystemEmailconnectorsIdParsingstylesIdParsingrulesCountEndpoint( + ConnectWiseEndpoint +): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/emailConnectors/{id}/parsingStyles/{id}/parsingRules/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +35,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/emailConnectors/{id}/parsingStyles/{id}/parsingRules/count endpoint. @@ -41,4 +47,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesEndpoint.py index 184706ad3..5d1bbf91d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesIdParsingrulesCountEndpoint import \ - SystemEmailconnectorsIdParsingstylesIdParsingrulesCountEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint import \ - SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint +from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesIdParsingrulesCountEndpoint import ( + SystemEmailconnectorsIdParsingstylesIdParsingrulesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint import ( + SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EmailConnectorParsingRule from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,10 +17,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "parsingRules", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - SystemEmailconnectorsIdParsingstylesIdParsingrulesCountEndpoint(client, parent_endpoint=self) + SystemEmailconnectorsIdParsingstylesIdParsingrulesCountEndpoint( + client, parent_endpoint=self + ) ) - def id(self, id: int) -> SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint: + def id( + self, id: int + ) -> SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint: """ Sets the ID for this endpoint and returns an initialized SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint object to move down the chain. @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEnd Returns: SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint: The initialized SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint object. """ - child = SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint(self.client, parent_endpoint=self) + child = SystemEmailconnectorsIdParsingstylesIdParsingrulesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EmailConnectorParsingRule]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EmailConnectorParsingRule]: """ Performs a GET request against the /system/emailConnectors/{id}/parsingStyles/{id}/parsingRules endpoint. @@ -65,10 +75,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[EmailConnectorParsingRule]: The parsed response data. """ return self._parse_many( - EmailConnectorParsingRule, super()._make_request("GET", data=data, params=params).json() + EmailConnectorParsingRule, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingRule: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnectorParsingRule: """ Performs a POST request against the /system/emailConnectors/{id}/parsingStyles/{id}/parsingRules endpoint. @@ -79,5 +92,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingRule: The parsed response data. """ return self._parse_one( - EmailConnectorParsingRule, super()._make_request("POST", data=data, params=params).json() + EmailConnectorParsingRule, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesIdEndpoint.py index 9043c64d1..5f4112092 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsIdParsingStylesIdParsingRulesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingRule: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnectorParsingRule: """ Performs a GET request against the /system/emailConnectors/{id}/parsingStyles/{id}/parsingRules/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailConnectorParsingRule: The parsed response data. """ - return self._parse_one(EmailConnectorParsingRule, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + EmailConnectorParsingRule, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/emailConnectors/{id}/parsingStyles/{id}/parsingRules/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingRule: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnectorParsingRule: """ Performs a PUT request against the /system/emailConnectors/{id}/parsingStyles/{id}/parsingRules/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailConnectorParsingRule: The parsed response data. """ - return self._parse_one(EmailConnectorParsingRule, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + EmailConnectorParsingRule, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingRule: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailConnectorParsingRule: """ Performs a PATCH request against the /system/emailConnectors/{id}/parsingStyles/{id}/parsingRules/{id} endpoint. @@ -80,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailConnectorParsingRule: The parsed response data. """ return self._parse_one( - EmailConnectorParsingRule, super()._make_request("PATCH", data=data, params=params).json() + EmailConnectorParsingRule, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsInfoCountEndpoint.py index 1552c2454..5097d0489 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemEmailconnectorsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/emailConnectors/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/emailConnectors/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsInfoEndpoint.py index 7e11496e2..bb39d5eff 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailConnectorsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsInfoCountEndpoint import SystemEmailconnectorsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemEmailconnectorsInfoCountEndpoint import ( + SystemEmailconnectorsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EmailConnectorInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemEmailconnectorsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemEmailconnectorsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemEmailconnectorsInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EmailConnectorInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EmailConnectorInfo]: """ Performs a GET request against the /system/emailConnectors/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EmailConnectorInfo]: The parsed response data. """ - return self._parse_many(EmailConnectorInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EmailConnectorInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsCountEndpoint.py index 4cf93ba59..d3dcc2a66 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemEmailexclusionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/emailExclusions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/emailExclusions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsEndpoint.py index 387b0157f..df3b1f41e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemEmailexclusionsCountEndpoint import SystemEmailexclusionsCountEndpoint -from pyconnectwise.endpoints.manage.SystemEmailexclusionsIdEndpoint import SystemEmailexclusionsIdEndpoint +from pyconnectwise.endpoints.manage.SystemEmailexclusionsCountEndpoint import ( + SystemEmailexclusionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailexclusionsIdEndpoint import ( + SystemEmailexclusionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EmailExclusion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemEmailexclusionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "emailExclusions", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemEmailexclusionsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemEmailexclusionsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemEmailexclusionsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EmailExclusion]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EmailExclusion]: """ Performs a GET request against the /system/emailExclusions endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EmailExclusion]: The parsed response data. """ - return self._parse_many(EmailExclusion, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EmailExclusion, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailExclusion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailExclusion: """ Performs a POST request against the /system/emailExclusions endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: EmailExclusion: The parsed response data. """ - return self._parse_one(EmailExclusion, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + EmailExclusion, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsIdEndpoint.py index 02c481b09..ac6abc22c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailExclusionsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailExclusion: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailExclusion: """ Performs a GET request against the /system/emailExclusions/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailExclusion: The parsed response data. """ - return self._parse_one(EmailExclusion, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + EmailExclusion, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/emailExclusions/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailExclusion: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailExclusion: """ Performs a PUT request against the /system/emailExclusions/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailExclusion: The parsed response data. """ - return self._parse_one(EmailExclusion, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + EmailExclusion, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailExclusion: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailExclusion: """ Performs a PATCH request against the /system/emailExclusions/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: EmailExclusion: The parsed response data. """ - return self._parse_one(EmailExclusion, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + EmailExclusion, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailTokensCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailTokensCountEndpoint.py index 8486b44fd..db73ea4f4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailTokensCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailTokensCountEndpoint.py @@ -10,7 +10,9 @@ class SystemEmailtokensCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/emailTokens/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/emailTokens/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailTokensEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailTokensEndpoint.py index 686f650fd..e2ecfcca9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailTokensEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailTokensEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemEmailtokensCountEndpoint import SystemEmailtokensCountEndpoint -from pyconnectwise.endpoints.manage.SystemEmailtokensIdEndpoint import SystemEmailtokensIdEndpoint +from pyconnectwise.endpoints.manage.SystemEmailtokensCountEndpoint import ( + SystemEmailtokensCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailtokensIdEndpoint import ( + SystemEmailtokensIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import EmailToken from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemEmailtokensEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "emailTokens", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemEmailtokensCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemEmailtokensCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemEmailtokensIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemEmailtokensIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[EmailToken]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[EmailToken]: """ Performs a GET request against the /system/emailTokens endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[EmailToken]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[EmailToken]: """ Performs a GET request against the /system/emailTokens endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[EmailToken]: The parsed response data. """ - return self._parse_many(EmailToken, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + EmailToken, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEmailTokensIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEmailTokensIdEndpoint.py index b6ad6de23..a0247468c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEmailTokensIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEmailTokensIdEndpoint.py @@ -10,7 +10,9 @@ class SystemEmailtokensIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[EmailToken]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[EmailToken]: """ Performs a GET request against the /system/emailTokens/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> EmailToken: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> EmailToken: """ Performs a GET request against the /system/emailTokens/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: EmailToken: The parsed response data. """ - return self._parse_one(EmailToken, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + EmailToken, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemEndpoint.py index 7c77d4b1c..8987d6b3f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemEndpoint.py @@ -1,78 +1,197 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemAllowedfiletypesEndpoint import SystemAllowedfiletypesEndpoint -from pyconnectwise.endpoints.manage.SystemAllowedoriginsEndpoint import SystemAllowedoriginsEndpoint -from pyconnectwise.endpoints.manage.SystemApimembersEndpoint import SystemApimembersEndpoint -from pyconnectwise.endpoints.manage.SystemAudittrailEndpoint import SystemAudittrailEndpoint -from pyconnectwise.endpoints.manage.SystemAuthanvilsEndpoint import SystemAuthanvilsEndpoint -from pyconnectwise.endpoints.manage.SystemAutosynctimeEndpoint import SystemAutosynctimeEndpoint +from pyconnectwise.endpoints.manage.SystemAllowedfiletypesEndpoint import ( + SystemAllowedfiletypesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemAllowedoriginsEndpoint import ( + SystemAllowedoriginsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemApimembersEndpoint import ( + SystemApimembersEndpoint, +) +from pyconnectwise.endpoints.manage.SystemAudittrailEndpoint import ( + SystemAudittrailEndpoint, +) +from pyconnectwise.endpoints.manage.SystemAuthanvilsEndpoint import ( + SystemAuthanvilsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemAutosynctimeEndpoint import ( + SystemAutosynctimeEndpoint, +) from pyconnectwise.endpoints.manage.SystemBundlesEndpoint import SystemBundlesEndpoint -from pyconnectwise.endpoints.manage.SystemCallbacksEndpoint import SystemCallbacksEndpoint -from pyconnectwise.endpoints.manage.SystemCertificationsEndpoint import SystemCertificationsEndpoint -from pyconnectwise.endpoints.manage.SystemConnectwisehostedscreensEndpoint import SystemConnectwisehostedscreensEndpoint -from pyconnectwise.endpoints.manage.SystemConnectwisehostedsetupsEndpoint import SystemConnectwisehostedsetupsEndpoint -from pyconnectwise.endpoints.manage.SystemContactsyncEndpoint import SystemContactsyncEndpoint -from pyconnectwise.endpoints.manage.SystemCustomreportsEndpoint import SystemCustomreportsEndpoint -from pyconnectwise.endpoints.manage.SystemCwtimezonesEndpoint import SystemCwtimezonesEndpoint -from pyconnectwise.endpoints.manage.SystemDepartmentsEndpoint import SystemDepartmentsEndpoint -from pyconnectwise.endpoints.manage.SystemDirectionalsyncsEndpoint import SystemDirectionalsyncsEndpoint -from pyconnectwise.endpoints.manage.SystemDocumentsEndpoint import SystemDocumentsEndpoint -from pyconnectwise.endpoints.manage.SystemDocumenttypesEndpoint import SystemDocumenttypesEndpoint -from pyconnectwise.endpoints.manage.SystemEmailconnectorsEndpoint import SystemEmailconnectorsEndpoint -from pyconnectwise.endpoints.manage.SystemEmailexclusionsEndpoint import SystemEmailexclusionsEndpoint -from pyconnectwise.endpoints.manage.SystemEmailtokensEndpoint import SystemEmailtokensEndpoint -from pyconnectwise.endpoints.manage.SystemEpayconfigurationsEndpoint import SystemEpayconfigurationsEndpoint -from pyconnectwise.endpoints.manage.SystemExperimentsEndpoint import SystemExperimentsEndpoint -from pyconnectwise.endpoints.manage.SystemFileuploadsettingsEndpoint import SystemFileuploadsettingsEndpoint -from pyconnectwise.endpoints.manage.SystemGoogleemailsetupEndpoint import SystemGoogleemailsetupEndpoint +from pyconnectwise.endpoints.manage.SystemCallbacksEndpoint import ( + SystemCallbacksEndpoint, +) +from pyconnectwise.endpoints.manage.SystemCertificationsEndpoint import ( + SystemCertificationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemConnectwisehostedscreensEndpoint import ( + SystemConnectwisehostedscreensEndpoint, +) +from pyconnectwise.endpoints.manage.SystemConnectwisehostedsetupsEndpoint import ( + SystemConnectwisehostedsetupsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemContactsyncEndpoint import ( + SystemContactsyncEndpoint, +) +from pyconnectwise.endpoints.manage.SystemCustomreportsEndpoint import ( + SystemCustomreportsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemCwtimezonesEndpoint import ( + SystemCwtimezonesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDepartmentsEndpoint import ( + SystemDepartmentsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDirectionalsyncsEndpoint import ( + SystemDirectionalsyncsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDocumentsEndpoint import ( + SystemDocumentsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemDocumenttypesEndpoint import ( + SystemDocumenttypesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailconnectorsEndpoint import ( + SystemEmailconnectorsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailexclusionsEndpoint import ( + SystemEmailexclusionsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEmailtokensEndpoint import ( + SystemEmailtokensEndpoint, +) +from pyconnectwise.endpoints.manage.SystemEpayconfigurationsEndpoint import ( + SystemEpayconfigurationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemExperimentsEndpoint import ( + SystemExperimentsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemFileuploadsettingsEndpoint import ( + SystemFileuploadsettingsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemGoogleemailsetupEndpoint import ( + SystemGoogleemailsetupEndpoint, +) from pyconnectwise.endpoints.manage.SystemImapsEndpoint import SystemImapsEndpoint -from pyconnectwise.endpoints.manage.SystemImportmassmaintenanceEndpoint import SystemImportmassmaintenanceEndpoint +from pyconnectwise.endpoints.manage.SystemImportmassmaintenanceEndpoint import ( + SystemImportmassmaintenanceEndpoint, +) from pyconnectwise.endpoints.manage.SystemInfoEndpoint import SystemInfoEndpoint -from pyconnectwise.endpoints.manage.SystemInoutboardsEndpoint import SystemInoutboardsEndpoint -from pyconnectwise.endpoints.manage.SystemInouttypesEndpoint import SystemInouttypesEndpoint -from pyconnectwise.endpoints.manage.SystemIntegratorloginsEndpoint import SystemIntegratorloginsEndpoint -from pyconnectwise.endpoints.manage.SystemIntegratortagsEndpoint import SystemIntegratortagsEndpoint -from pyconnectwise.endpoints.manage.SystemKpicategoriesEndpoint import SystemKpicategoriesEndpoint +from pyconnectwise.endpoints.manage.SystemInoutboardsEndpoint import ( + SystemInoutboardsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInouttypesEndpoint import ( + SystemInouttypesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemIntegratorloginsEndpoint import ( + SystemIntegratorloginsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemIntegratortagsEndpoint import ( + SystemIntegratortagsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemKpicategoriesEndpoint import ( + SystemKpicategoriesEndpoint, +) from pyconnectwise.endpoints.manage.SystemKpisEndpoint import SystemKpisEndpoint -from pyconnectwise.endpoints.manage.SystemLdapconfigurationsEndpoint import SystemLdapconfigurationsEndpoint +from pyconnectwise.endpoints.manage.SystemLdapconfigurationsEndpoint import ( + SystemLdapconfigurationsEndpoint, +) from pyconnectwise.endpoints.manage.SystemLinksEndpoint import SystemLinksEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsEndpoint import SystemLocationsEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncEndpoint import SystemM365contactsyncEndpoint -from pyconnectwise.endpoints.manage.SystemManagementnetworksecuritiesEndpoint import \ - SystemManagementnetworksecuritiesEndpoint -from pyconnectwise.endpoints.manage.SystemMarketplaceimportEndpoint import SystemMarketplaceimportEndpoint +from pyconnectwise.endpoints.manage.SystemLocationsEndpoint import ( + SystemLocationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemM365contactsyncEndpoint import ( + SystemM365contactsyncEndpoint, +) +from pyconnectwise.endpoints.manage.SystemManagementnetworksecuritiesEndpoint import ( + SystemManagementnetworksecuritiesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMarketplaceimportEndpoint import ( + SystemMarketplaceimportEndpoint, +) from pyconnectwise.endpoints.manage.SystemMembersEndpoint import SystemMembersEndpoint -from pyconnectwise.endpoints.manage.SystemMembertemplatesEndpoint import SystemMembertemplatesEndpoint -from pyconnectwise.endpoints.manage.SystemMenuentriesEndpoint import SystemMenuentriesEndpoint -from pyconnectwise.endpoints.manage.SystemMyaccountEndpoint import SystemMyaccountEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyEndpoint import SystemMycompanyEndpoint -from pyconnectwise.endpoints.manage.SystemMymembersEndpoint import SystemMymembersEndpoint -from pyconnectwise.endpoints.manage.SystemMysecurityEndpoint import SystemMysecurityEndpoint -from pyconnectwise.endpoints.manage.SystemNotificationrecipientsEndpoint import SystemNotificationrecipientsEndpoint -from pyconnectwise.endpoints.manage.SystemOffice365Endpoint import SystemOffice365Endpoint -from pyconnectwise.endpoints.manage.SystemOnpremisesearchsettingEndpoint import SystemOnpremisesearchsettingEndpoint -from pyconnectwise.endpoints.manage.SystemOsgradeweightsEndpoint import SystemOsgradeweightsEndpoint -from pyconnectwise.endpoints.manage.SystemParsingtypesEndpoint import SystemParsingtypesEndpoint -from pyconnectwise.endpoints.manage.SystemParsingvariablesEndpoint import SystemParsingvariablesEndpoint -from pyconnectwise.endpoints.manage.SystemPortalreportsEndpoint import SystemPortalreportsEndpoint -from pyconnectwise.endpoints.manage.SystemQuotelinksetupEndpoint import SystemQuotelinksetupEndpoint -from pyconnectwise.endpoints.manage.SystemReportcardsEndpoint import SystemReportcardsEndpoint +from pyconnectwise.endpoints.manage.SystemMembertemplatesEndpoint import ( + SystemMembertemplatesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMenuentriesEndpoint import ( + SystemMenuentriesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMyaccountEndpoint import ( + SystemMyaccountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMycompanyEndpoint import ( + SystemMycompanyEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMymembersEndpoint import ( + SystemMymembersEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMysecurityEndpoint import ( + SystemMysecurityEndpoint, +) +from pyconnectwise.endpoints.manage.SystemNotificationrecipientsEndpoint import ( + SystemNotificationrecipientsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemOffice365Endpoint import ( + SystemOffice365Endpoint, +) +from pyconnectwise.endpoints.manage.SystemOnpremisesearchsettingEndpoint import ( + SystemOnpremisesearchsettingEndpoint, +) +from pyconnectwise.endpoints.manage.SystemOsgradeweightsEndpoint import ( + SystemOsgradeweightsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemParsingtypesEndpoint import ( + SystemParsingtypesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemParsingvariablesEndpoint import ( + SystemParsingvariablesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemPortalreportsEndpoint import ( + SystemPortalreportsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemQuotelinksetupEndpoint import ( + SystemQuotelinksetupEndpoint, +) +from pyconnectwise.endpoints.manage.SystemReportcardsEndpoint import ( + SystemReportcardsEndpoint, +) from pyconnectwise.endpoints.manage.SystemReportsEndpoint import SystemReportsEndpoint -from pyconnectwise.endpoints.manage.SystemSecurityrolesEndpoint import SystemSecurityrolesEndpoint +from pyconnectwise.endpoints.manage.SystemSecurityrolesEndpoint import ( + SystemSecurityrolesEndpoint, +) from pyconnectwise.endpoints.manage.SystemSettingsEndpoint import SystemSettingsEndpoint -from pyconnectwise.endpoints.manage.SystemSetupscreensEndpoint import SystemSetupscreensEndpoint -from pyconnectwise.endpoints.manage.SystemSkillcategoriesEndpoint import SystemSkillcategoriesEndpoint +from pyconnectwise.endpoints.manage.SystemSetupscreensEndpoint import ( + SystemSetupscreensEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSkillcategoriesEndpoint import ( + SystemSkillcategoriesEndpoint, +) from pyconnectwise.endpoints.manage.SystemSkillsEndpoint import SystemSkillsEndpoint -from pyconnectwise.endpoints.manage.SystemSsoconfigurationsEndpoint import SystemSsoconfigurationsEndpoint +from pyconnectwise.endpoints.manage.SystemSsoconfigurationsEndpoint import ( + SystemSsoconfigurationsEndpoint, +) from pyconnectwise.endpoints.manage.SystemSsousersEndpoint import SystemSsousersEndpoint -from pyconnectwise.endpoints.manage.SystemStandardnotesEndpoint import SystemStandardnotesEndpoint +from pyconnectwise.endpoints.manage.SystemStandardnotesEndpoint import ( + SystemStandardnotesEndpoint, +) from pyconnectwise.endpoints.manage.SystemSurveysEndpoint import SystemSurveysEndpoint -from pyconnectwise.endpoints.manage.SystemTimezonesetupsEndpoint import SystemTimezonesetupsEndpoint -from pyconnectwise.endpoints.manage.SystemTodaypagecategoriesEndpoint import SystemTodaypagecategoriesEndpoint -from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsEndpoint import SystemUserdefinedfieldsEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowactionsEndpoint import SystemWorkflowactionsEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsEndpoint import SystemWorkflowsEndpoint +from pyconnectwise.endpoints.manage.SystemTimezonesetupsEndpoint import ( + SystemTimezonesetupsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemTodaypagecategoriesEndpoint import ( + SystemTodaypagecategoriesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsEndpoint import ( + SystemUserdefinedfieldsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowactionsEndpoint import ( + SystemWorkflowactionsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsEndpoint import ( + SystemWorkflowsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -81,132 +200,228 @@ class SystemEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "system", parent_endpoint=parent_endpoint) - self.auto_sync_time = self._register_child_endpoint(SystemAutosynctimeEndpoint(client, parent_endpoint=self)) - self.management_network_securities = self._register_child_endpoint( - SystemManagementnetworksecuritiesEndpoint(client, parent_endpoint=self) + self.my_account = self._register_child_endpoint( + SystemMyaccountEndpoint(client, parent_endpoint=self) + ) + self.time_zone_setups = self._register_child_endpoint( + SystemTimezonesetupsEndpoint(client, parent_endpoint=self) + ) + self.fileuploadsettings = self._register_child_endpoint( + SystemFileuploadsettingsEndpoint(client, parent_endpoint=self) + ) + self.certifications = self._register_child_endpoint( + SystemCertificationsEndpoint(client, parent_endpoint=self) + ) + self.members = self._register_child_endpoint( + SystemMembersEndpoint(client, parent_endpoint=self) + ) + self.menu_entries = self._register_child_endpoint( + SystemMenuentriesEndpoint(client, parent_endpoint=self) + ) + self.sso_users = self._register_child_endpoint( + SystemSsousersEndpoint(client, parent_endpoint=self) + ) + self.email_tokens = self._register_child_endpoint( + SystemEmailtokensEndpoint(client, parent_endpoint=self) + ) + self.setup_screens = self._register_child_endpoint( + SystemSetupscreensEndpoint(client, parent_endpoint=self) + ) + self.notification_recipients = self._register_child_endpoint( + SystemNotificationrecipientsEndpoint(client, parent_endpoint=self) + ) + self.my_company = self._register_child_endpoint( + SystemMycompanyEndpoint(client, parent_endpoint=self) + ) + self.settings = self._register_child_endpoint( + SystemSettingsEndpoint(client, parent_endpoint=self) + ) + self.cw_time_zones = self._register_child_endpoint( + SystemCwtimezonesEndpoint(client, parent_endpoint=self) ) - self.members = self._register_child_endpoint(SystemMembersEndpoint(client, parent_endpoint=self)) self.sso_configurations = self._register_child_endpoint( SystemSsoconfigurationsEndpoint(client, parent_endpoint=self) ) - self.skills = self._register_child_endpoint(SystemSkillsEndpoint(client, parent_endpoint=self)) - self.osgradeweights = self._register_child_endpoint(SystemOsgradeweightsEndpoint(client, parent_endpoint=self)) - self.time_zone_setups = self._register_child_endpoint( - SystemTimezonesetupsEndpoint(client, parent_endpoint=self) + self.standard_notes = self._register_child_endpoint( + SystemStandardnotesEndpoint(client, parent_endpoint=self) ) - self.portal_reports = self._register_child_endpoint(SystemPortalreportsEndpoint(client, parent_endpoint=self)) - self.workflow_actions = self._register_child_endpoint( - SystemWorkflowactionsEndpoint(client, parent_endpoint=self) + self.allowed_file_types = self._register_child_endpoint( + SystemAllowedfiletypesEndpoint(client, parent_endpoint=self) ) - self.marketplaceimport = self._register_child_endpoint( - SystemMarketplaceimportEndpoint(client, parent_endpoint=self) + self.imaps = self._register_child_endpoint( + SystemImapsEndpoint(client, parent_endpoint=self) + ) + self.on_premise_search_setting = self._register_child_endpoint( + SystemOnpremisesearchsettingEndpoint(client, parent_endpoint=self) + ) + self.reports = self._register_child_endpoint( + SystemReportsEndpoint(client, parent_endpoint=self) + ) + self.links = self._register_child_endpoint( + SystemLinksEndpoint(client, parent_endpoint=self) + ) + self.skill_categories = self._register_child_endpoint( + SystemSkillcategoriesEndpoint(client, parent_endpoint=self) + ) + self.callbacks = self._register_child_endpoint( + SystemCallbacksEndpoint(client, parent_endpoint=self) + ) + self.workflows = self._register_child_endpoint( + SystemWorkflowsEndpoint(client, parent_endpoint=self) + ) + self.audittrail = self._register_child_endpoint( + SystemAudittrailEndpoint(client, parent_endpoint=self) + ) + self.parsing_variables = self._register_child_endpoint( + SystemParsingvariablesEndpoint(client, parent_endpoint=self) ) - self.document_types = self._register_child_endpoint(SystemDocumenttypesEndpoint(client, parent_endpoint=self)) - self.in_out_types = self._register_child_endpoint(SystemInouttypesEndpoint(client, parent_endpoint=self)) self.quote_link_setup = self._register_child_endpoint( SystemQuotelinksetupEndpoint(client, parent_endpoint=self) ) - self.googleemailsetup = self._register_child_endpoint( - SystemGoogleemailsetupEndpoint(client, parent_endpoint=self) + self.custom_reports = self._register_child_endpoint( + SystemCustomreportsEndpoint(client, parent_endpoint=self) ) - self.imaps = self._register_child_endpoint(SystemImapsEndpoint(client, parent_endpoint=self)) - self.documents = self._register_child_endpoint(SystemDocumentsEndpoint(client, parent_endpoint=self)) - self.securityroles = self._register_child_endpoint(SystemSecurityrolesEndpoint(client, parent_endpoint=self)) - self.integrator_tags = self._register_child_endpoint(SystemIntegratortagsEndpoint(client, parent_endpoint=self)) - self.directional_syncs = self._register_child_endpoint( - SystemDirectionalsyncsEndpoint(client, parent_endpoint=self) + self.my_members = self._register_child_endpoint( + SystemMymembersEndpoint(client, parent_endpoint=self) + ) + self.bundles = self._register_child_endpoint( + SystemBundlesEndpoint(client, parent_endpoint=self) + ) + self.osgradeweights = self._register_child_endpoint( + SystemOsgradeweightsEndpoint(client, parent_endpoint=self) + ) + self.documents = self._register_child_endpoint( + SystemDocumentsEndpoint(client, parent_endpoint=self) + ) + self.integratorlogins = self._register_child_endpoint( + SystemIntegratorloginsEndpoint(client, parent_endpoint=self) + ) + self.membertemplates = self._register_child_endpoint( + SystemMembertemplatesEndpoint(client, parent_endpoint=self) + ) + self.auto_sync_time = self._register_child_endpoint( + SystemAutosynctimeEndpoint(client, parent_endpoint=self) + ) + self.security_roles = self._register_child_endpoint( + SystemSecurityrolesEndpoint(client, parent_endpoint=self) ) - self.experiments = self._register_child_endpoint(SystemExperimentsEndpoint(client, parent_endpoint=self)) self.import_mass_maintenance = self._register_child_endpoint( SystemImportmassmaintenanceEndpoint(client, parent_endpoint=self) ) - self.on_premise_search_setting = self._register_child_endpoint( - SystemOnpremisesearchsettingEndpoint(client, parent_endpoint=self) + self.kpi_categories = self._register_child_endpoint( + SystemKpicategoriesEndpoint(client, parent_endpoint=self) + ) + self.integrator_tags = self._register_child_endpoint( + SystemIntegratortagsEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemInfoEndpoint(client, parent_endpoint=self) + ) + self.portal_reports = self._register_child_endpoint( + SystemPortalreportsEndpoint(client, parent_endpoint=self) + ) + self.contactsync = self._register_child_endpoint( + SystemContactsyncEndpoint(client, parent_endpoint=self) + ) + self.office365 = self._register_child_endpoint( + SystemOffice365Endpoint(client, parent_endpoint=self) + ) + self.securityroles = self._register_child_endpoint( + SystemSecurityrolesEndpoint(client, parent_endpoint=self) + ) + self.email_connectors = self._register_child_endpoint( + SystemEmailconnectorsEndpoint(client, parent_endpoint=self) ) - self.info = self._register_child_endpoint(SystemInfoEndpoint(client, parent_endpoint=self)) - self.kpis = self._register_child_endpoint(SystemKpisEndpoint(client, parent_endpoint=self)) - self.kpi_categories = self._register_child_endpoint(SystemKpicategoriesEndpoint(client, parent_endpoint=self)) - self.menuentries = self._register_child_endpoint(SystemMenuentriesEndpoint(client, parent_endpoint=self)) - self.office365 = self._register_child_endpoint(SystemOffice365Endpoint(client, parent_endpoint=self)) - self.parsing_types = self._register_child_endpoint(SystemParsingtypesEndpoint(client, parent_endpoint=self)) - self.links = self._register_child_endpoint(SystemLinksEndpoint(client, parent_endpoint=self)) - self.report_cards = self._register_child_endpoint(SystemReportcardsEndpoint(client, parent_endpoint=self)) - self.setup_screens = self._register_child_endpoint(SystemSetupscreensEndpoint(client, parent_endpoint=self)) - self.contactsync = self._register_child_endpoint(SystemContactsyncEndpoint(client, parent_endpoint=self)) - self.allowedorigins = self._register_child_endpoint(SystemAllowedoriginsEndpoint(client, parent_endpoint=self)) - self.my_security = self._register_child_endpoint(SystemMysecurityEndpoint(client, parent_endpoint=self)) self.allowedfiletypes = self._register_child_endpoint( SystemAllowedfiletypesEndpoint(client, parent_endpoint=self) ) - self.user_defined_fields = self._register_child_endpoint( - SystemUserdefinedfieldsEndpoint(client, parent_endpoint=self) + self.email_exclusions = self._register_child_endpoint( + SystemEmailexclusionsEndpoint(client, parent_endpoint=self) ) - self.menu_entries = self._register_child_endpoint(SystemMenuentriesEndpoint(client, parent_endpoint=self)) - self.callbacks = self._register_child_endpoint(SystemCallbacksEndpoint(client, parent_endpoint=self)) - self.ldap_configurations = self._register_child_endpoint( - SystemLdapconfigurationsEndpoint(client, parent_endpoint=self) + self.in_out_types = self._register_child_endpoint( + SystemInouttypesEndpoint(client, parent_endpoint=self) ) - self.workflows = self._register_child_endpoint(SystemWorkflowsEndpoint(client, parent_endpoint=self)) - self.in_out_boards = self._register_child_endpoint(SystemInoutboardsEndpoint(client, parent_endpoint=self)) - self.api_members = self._register_child_endpoint(SystemApimembersEndpoint(client, parent_endpoint=self)) - self.email_tokens = self._register_child_endpoint(SystemEmailtokensEndpoint(client, parent_endpoint=self)) - self.e_pay_configurations = self._register_child_endpoint( - SystemEpayconfigurationsEndpoint(client, parent_endpoint=self) + self.workflow_actions = self._register_child_endpoint( + SystemWorkflowactionsEndpoint(client, parent_endpoint=self) ) - self.notification_recipients = self._register_child_endpoint( - SystemNotificationrecipientsEndpoint(client, parent_endpoint=self) + self.my_security = self._register_child_endpoint( + SystemMysecurityEndpoint(client, parent_endpoint=self) ) - self.allowed_file_types = self._register_child_endpoint( - SystemAllowedfiletypesEndpoint(client, parent_endpoint=self) + self.departments = self._register_child_endpoint( + SystemDepartmentsEndpoint(client, parent_endpoint=self) ) - self.connect_wise_hosted_screens = self._register_child_endpoint( - SystemConnectwisehostedscreensEndpoint(client, parent_endpoint=self) + self.directional_syncs = self._register_child_endpoint( + SystemDirectionalsyncsEndpoint(client, parent_endpoint=self) + ) + self.googleemailsetup = self._register_child_endpoint( + SystemGoogleemailsetupEndpoint(client, parent_endpoint=self) + ) + self.management_network_securities = self._register_child_endpoint( + SystemManagementnetworksecuritiesEndpoint(client, parent_endpoint=self) ) - self.security_roles = self._register_child_endpoint(SystemSecurityrolesEndpoint(client, parent_endpoint=self)) - self.settings = self._register_child_endpoint(SystemSettingsEndpoint(client, parent_endpoint=self)) self.today_page_categories = self._register_child_endpoint( SystemTodaypagecategoriesEndpoint(client, parent_endpoint=self) ) - self.certifications = self._register_child_endpoint(SystemCertificationsEndpoint(client, parent_endpoint=self)) - self.reports = self._register_child_endpoint(SystemReportsEndpoint(client, parent_endpoint=self)) - self.my_company = self._register_child_endpoint(SystemMycompanyEndpoint(client, parent_endpoint=self)) - self.bundles = self._register_child_endpoint(SystemBundlesEndpoint(client, parent_endpoint=self)) - self.fileuploadsettings = self._register_child_endpoint( - SystemFileuploadsettingsEndpoint(client, parent_endpoint=self) + self.connect_wise_hosted_screens = self._register_child_endpoint( + SystemConnectwisehostedscreensEndpoint(client, parent_endpoint=self) ) - self.membertemplates = self._register_child_endpoint( - SystemMembertemplatesEndpoint(client, parent_endpoint=self) + self.document_types = self._register_child_endpoint( + SystemDocumenttypesEndpoint(client, parent_endpoint=self) ) - self.email_connectors = self._register_child_endpoint( - SystemEmailconnectorsEndpoint(client, parent_endpoint=self) + self.allowedorigins = self._register_child_endpoint( + SystemAllowedoriginsEndpoint(client, parent_endpoint=self) ) - self.email_exclusions = self._register_child_endpoint( - SystemEmailexclusionsEndpoint(client, parent_endpoint=self) + self.api_members = self._register_child_endpoint( + SystemApimembersEndpoint(client, parent_endpoint=self) ) - self.parsing_variables = self._register_child_endpoint( - SystemParsingvariablesEndpoint(client, parent_endpoint=self) + self.in_out_boards = self._register_child_endpoint( + SystemInoutboardsEndpoint(client, parent_endpoint=self) ) - self.cw_time_zones = self._register_child_endpoint(SystemCwtimezonesEndpoint(client, parent_endpoint=self)) - self.departments = self._register_child_endpoint(SystemDepartmentsEndpoint(client, parent_endpoint=self)) - self.locations = self._register_child_endpoint(SystemLocationsEndpoint(client, parent_endpoint=self)) - self.auth_anvils = self._register_child_endpoint(SystemAuthanvilsEndpoint(client, parent_endpoint=self)) - self.connectwisehostedsetups = self._register_child_endpoint( - SystemConnectwisehostedsetupsEndpoint(client, parent_endpoint=self) + self.locations = self._register_child_endpoint( + SystemLocationsEndpoint(client, parent_endpoint=self) ) - self.integratorlogins = self._register_child_endpoint( - SystemIntegratorloginsEndpoint(client, parent_endpoint=self) + self.ldap_configurations = self._register_child_endpoint( + SystemLdapconfigurationsEndpoint(client, parent_endpoint=self) ) - self.mycompany = self._register_child_endpoint(SystemMycompanyEndpoint(client, parent_endpoint=self)) - self.standard_notes = self._register_child_endpoint(SystemStandardnotesEndpoint(client, parent_endpoint=self)) - self.skill_categories = self._register_child_endpoint( - SystemSkillcategoriesEndpoint(client, parent_endpoint=self) + self.report_cards = self._register_child_endpoint( + SystemReportcardsEndpoint(client, parent_endpoint=self) + ) + self.menuentries = self._register_child_endpoint( + SystemMenuentriesEndpoint(client, parent_endpoint=self) + ) + self.mycompany = self._register_child_endpoint( + SystemMycompanyEndpoint(client, parent_endpoint=self) ) - self.surveys = self._register_child_endpoint(SystemSurveysEndpoint(client, parent_endpoint=self)) - self.audittrail = self._register_child_endpoint(SystemAudittrailEndpoint(client, parent_endpoint=self)) - self.sso_users = self._register_child_endpoint(SystemSsousersEndpoint(client, parent_endpoint=self)) - self.custom_reports = self._register_child_endpoint(SystemCustomreportsEndpoint(client, parent_endpoint=self)) self.m365contactsync = self._register_child_endpoint( SystemM365contactsyncEndpoint(client, parent_endpoint=self) ) - self.my_account = self._register_child_endpoint(SystemMyaccountEndpoint(client, parent_endpoint=self)) - self.my_members = self._register_child_endpoint(SystemMymembersEndpoint(client, parent_endpoint=self)) + self.marketplaceimport = self._register_child_endpoint( + SystemMarketplaceimportEndpoint(client, parent_endpoint=self) + ) + self.skills = self._register_child_endpoint( + SystemSkillsEndpoint(client, parent_endpoint=self) + ) + self.user_defined_fields = self._register_child_endpoint( + SystemUserdefinedfieldsEndpoint(client, parent_endpoint=self) + ) + self.experiments = self._register_child_endpoint( + SystemExperimentsEndpoint(client, parent_endpoint=self) + ) + self.kpis = self._register_child_endpoint( + SystemKpisEndpoint(client, parent_endpoint=self) + ) + self.e_pay_configurations = self._register_child_endpoint( + SystemEpayconfigurationsEndpoint(client, parent_endpoint=self) + ) + self.connectwisehostedsetups = self._register_child_endpoint( + SystemConnectwisehostedsetupsEndpoint(client, parent_endpoint=self) + ) + self.parsing_types = self._register_child_endpoint( + SystemParsingtypesEndpoint(client, parent_endpoint=self) + ) + self.auth_anvils = self._register_child_endpoint( + SystemAuthanvilsEndpoint(client, parent_endpoint=self) + ) + self.surveys = self._register_child_endpoint( + SystemSurveysEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemExperimentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemExperimentsCountEndpoint.py index b5d799171..69bcca8dc 100644 --- a/src/pyconnectwise/endpoints/manage/SystemExperimentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemExperimentsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemExperimentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/experiments/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/experiments/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemExperimentsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemExperimentsEndpoint.py index 0f9236f91..94754a239 100644 --- a/src/pyconnectwise/endpoints/manage/SystemExperimentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemExperimentsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemExperimentsCountEndpoint import SystemExperimentsCountEndpoint -from pyconnectwise.endpoints.manage.SystemExperimentsIdEndpoint import SystemExperimentsIdEndpoint +from pyconnectwise.endpoints.manage.SystemExperimentsCountEndpoint import ( + SystemExperimentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemExperimentsIdEndpoint import ( + SystemExperimentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Experiment from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemExperimentsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "experiments", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemExperimentsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemExperimentsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemExperimentsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemExperimentsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Experiment]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Experiment]: """ Performs a GET request against the /system/experiments endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Experiment]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Experiment]: """ Performs a GET request against the /system/experiments endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Experiment]: The parsed response data. """ - return self._parse_many(Experiment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Experiment, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemExperimentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemExperimentsIdEndpoint.py index bde8bf59e..30a5df027 100644 --- a/src/pyconnectwise/endpoints/manage/SystemExperimentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemExperimentsIdEndpoint.py @@ -10,7 +10,9 @@ class SystemExperimentsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Experiment]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Experiment]: """ Performs a GET request against the /system/experiments/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Experiment: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Experiment: """ Performs a GET request against the /system/experiments/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> E Returns: Experiment: The parsed response data. """ - return self._parse_one(Experiment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Experiment, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsCountEndpoint.py index b97df1a20..f90cf53b5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemFileuploadsettingsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/fileuploadsettings/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/fileuploadsettings/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsEndpoint.py index 77131cc60..d5a7ad673 100644 --- a/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemFileuploadsettingsCountEndpoint import SystemFileuploadsettingsCountEndpoint -from pyconnectwise.endpoints.manage.SystemFileuploadsettingsIdEndpoint import SystemFileuploadsettingsIdEndpoint +from pyconnectwise.endpoints.manage.SystemFileuploadsettingsCountEndpoint import ( + SystemFileuploadsettingsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemFileuploadsettingsIdEndpoint import ( + SystemFileuploadsettingsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class SystemFileuploadsettingsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "fileuploadsettings", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemFileuploadsettingsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemFileuploadsettingsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemFileuploadsettingsIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsIdEndpoint.py index ff41e6c35..087b028b7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemFileuploadsettingsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> FileUploadSetting: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> FileUploadSetting: """ Performs a GET request against the /system/fileuploadsettings/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> F Returns: FileUploadSetting: The parsed response data. """ - return self._parse_one(FileUploadSetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + FileUploadSetting, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> FileUploadSetting: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> FileUploadSetting: """ Performs a PUT request against the /system/fileuploadsettings/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> F Returns: FileUploadSetting: The parsed response data. """ - return self._parse_one(FileUploadSetting, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + FileUploadSetting, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> FileUploadSetting: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> FileUploadSetting: """ Performs a PATCH request against the /system/fileuploadsettings/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: FileUploadSetting: The parsed response data. """ - return self._parse_one(FileUploadSetting, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + FileUploadSetting, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupCountEndpoint.py index 0cfa47811..adc4e444b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupCountEndpoint.py @@ -10,7 +10,9 @@ class SystemGoogleemailsetupCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/googleemailsetup/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/googleemailsetup/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupEndpoint.py index d95115591..12179d900 100644 --- a/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemGoogleemailsetupCountEndpoint import SystemGoogleemailsetupCountEndpoint -from pyconnectwise.endpoints.manage.SystemGoogleemailsetupIdEndpoint import SystemGoogleemailsetupIdEndpoint +from pyconnectwise.endpoints.manage.SystemGoogleemailsetupCountEndpoint import ( + SystemGoogleemailsetupCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemGoogleemailsetupIdEndpoint import ( + SystemGoogleemailsetupIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class SystemGoogleemailsetupEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "googleemailsetup", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemGoogleemailsetupCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemGoogleemailsetupCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemGoogleemailsetupIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupIdEndpoint.py index 43207e5e7..064e33d5f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemGoogleemailsetupIdTestconnectionEndpoint import \ - SystemGoogleemailsetupIdTestconnectionEndpoint +from pyconnectwise.endpoints.manage.SystemGoogleemailsetupIdTestconnectionEndpoint import ( + SystemGoogleemailsetupIdTestconnectionEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import GoogleEmailSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GoogleEmailSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GoogleEmailSetup: """ Performs a GET request against the /system/googleemailsetup/{id} endpoint. @@ -49,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GoogleEmailSetup: The parsed response data. """ - return self._parse_one(GoogleEmailSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GoogleEmailSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/googleemailsetup/{id} endpoint. @@ -61,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GoogleEmailSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GoogleEmailSetup: """ Performs a PUT request against the /system/googleemailsetup/{id} endpoint. @@ -73,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GoogleEmailSetup: The parsed response data. """ - return self._parse_one(GoogleEmailSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + GoogleEmailSetup, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GoogleEmailSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GoogleEmailSetup: """ Performs a PATCH request against the /system/googleemailsetup/{id} endpoint. @@ -85,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GoogleEmailSetup: The parsed response data. """ - return self._parse_one(GoogleEmailSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + GoogleEmailSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupIdTestConnectionEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupIdTestConnectionEndpoint.py index 155d15e3f..49bd3109f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupIdTestConnectionEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemGoogleemailsetupIdTestConnectionEndpoint.py @@ -10,7 +10,9 @@ class SystemGoogleemailsetupIdTestconnectionEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "testConnection", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/googleemailsetup/{id}/testConnection endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemImapsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemImapsCountEndpoint.py index e8f2ff083..fc2ce5a4e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemImapsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemImapsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemImapsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/imaps/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/imaps/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemImapsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemImapsEndpoint.py index 00bb80985..ee1980695 100644 --- a/src/pyconnectwise/endpoints/manage/SystemImapsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemImapsEndpoint.py @@ -1,9 +1,13 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemImapsCountEndpoint import SystemImapsCountEndpoint +from pyconnectwise.endpoints.manage.SystemImapsCountEndpoint import ( + SystemImapsCountEndpoint, +) from pyconnectwise.endpoints.manage.SystemImapsIdEndpoint import SystemImapsIdEndpoint -from pyconnectwise.endpoints.manage.SystemImapsInfoEndpoint import SystemImapsInfoEndpoint +from pyconnectwise.endpoints.manage.SystemImapsInfoEndpoint import ( + SystemImapsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Imap from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +17,12 @@ class SystemImapsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "imaps", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemImapsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemImapsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemImapsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemImapsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemImapsIdEndpoint: """ @@ -29,7 +37,9 @@ def id(self, id: int) -> SystemImapsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Imap]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Imap]: """ Performs a GET request against the /system/imaps endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +60,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Imap]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Imap]: """ Performs a GET request against the /system/imaps endpoint. @@ -60,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Imap]: The parsed response data. """ - return self._parse_many(Imap, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Imap, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Imap: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Imap: """ Performs a POST request against the /system/imaps endpoint. @@ -72,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Imap: The parsed response data. """ - return self._parse_one(Imap, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Imap, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemImapsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemImapsIdEndpoint.py index 9ea0b755a..a490bbf44 100644 --- a/src/pyconnectwise/endpoints/manage/SystemImapsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemImapsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemImapsIdInfoEndpoint import SystemImapsIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemImapsIdInfoEndpoint import ( + SystemImapsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Imap from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemImapsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemImapsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemImapsIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Imap]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Imap]: """ Performs a GET request against the /system/imaps/{id} endpoint and returns an initialized PaginatedResponse object. @@ -44,9 +50,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: Imap: The parsed response data. """ - return self._parse_one(Imap, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Imap, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/imaps/{id} endpoint. @@ -56,7 +66,10 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Imap: """ @@ -68,9 +81,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: Imap: The parsed response data. """ - return self._parse_one(Imap, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Imap, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Imap: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Imap: """ Performs a PATCH request against the /system/imaps/{id} endpoint. @@ -80,4 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Imap: The parsed response data. """ - return self._parse_one(Imap, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Imap, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemImapsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemImapsIdInfoEndpoint.py index 31d3d492e..e877807e5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemImapsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemImapsIdInfoEndpoint.py @@ -10,7 +10,9 @@ class SystemImapsIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ImapInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ImapInfo]: """ Performs a GET request against the /system/imaps/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ImapInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ImapInfo: """ Performs a GET request against the /system/imaps/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: ImapInfo: The parsed response data. """ - return self._parse_one(ImapInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ImapInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemImapsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemImapsInfoCountEndpoint.py index d2271b898..b70b83908 100644 --- a/src/pyconnectwise/endpoints/manage/SystemImapsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemImapsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemImapsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/imaps/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/imaps/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemImapsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemImapsInfoEndpoint.py index 1fa20ac41..2db0685ec 100644 --- a/src/pyconnectwise/endpoints/manage/SystemImapsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemImapsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemImapsInfoCountEndpoint import SystemImapsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemImapsInfoCountEndpoint import ( + SystemImapsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ImapInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemImapsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemImapsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemImapsInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ImapInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ImapInfo]: """ Performs a GET request against the /system/imaps/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ImapInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ImapInfo]: """ Performs a GET request against the /system/imaps/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ImapInfo]: The parsed response data. """ - return self._parse_many(ImapInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ImapInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemImportMassMaintenanceIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemImportMassMaintenanceIdEndpoint.py index 5d6f5fd9d..52c8ebebc 100644 --- a/src/pyconnectwise/endpoints/manage/SystemImportMassMaintenanceIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemImportMassMaintenanceIdEndpoint.py @@ -10,7 +10,9 @@ class SystemImportmassmaintenanceIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ImportMassMaintenance: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ImportMassMaintenance: """ Performs a POST request against the /system/importMassMaintenance/{id} endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ImportMassMaintenance: The parsed response data. """ - return self._parse_one(ImportMassMaintenance, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ImportMassMaintenance, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemImportmassmaintenanceEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemImportmassmaintenanceEndpoint.py index 37672c6b8..ef7ac526a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemImportmassmaintenanceEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemImportmassmaintenanceEndpoint.py @@ -1,14 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemImportmassmaintenanceIdEndpoint import SystemImportmassmaintenanceIdEndpoint +from pyconnectwise.endpoints.manage.SystemImportmassmaintenanceIdEndpoint import ( + SystemImportmassmaintenanceIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class SystemImportmassmaintenanceEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "importMassMaintenance", parent_endpoint=parent_endpoint) + super().__init__( + client, "importMassMaintenance", parent_endpoint=parent_endpoint + ) def id(self, id: int) -> SystemImportmassmaintenanceIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/SystemInOutBoardsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInOutBoardsCountEndpoint.py index 72ed0c6d2..0a0a4a470 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInOutBoardsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInOutBoardsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemInoutboardsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/inOutBoards/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/inOutBoards/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInOutBoardsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInOutBoardsEndpoint.py index 677ce8c25..7bce351bf 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInOutBoardsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInOutBoardsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInoutboardsCountEndpoint import SystemInoutboardsCountEndpoint -from pyconnectwise.endpoints.manage.SystemInoutboardsIdEndpoint import SystemInoutboardsIdEndpoint +from pyconnectwise.endpoints.manage.SystemInoutboardsCountEndpoint import ( + SystemInoutboardsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInoutboardsIdEndpoint import ( + SystemInoutboardsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InOutBoard from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemInoutboardsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "inOutBoards", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemInoutboardsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemInoutboardsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemInoutboardsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemInoutboardsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[InOutBoard]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[InOutBoard]: """ Performs a GET request against the /system/inOutBoards endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[InOutBoard]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[InOutBoard]: """ Performs a GET request against the /system/inOutBoards endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[InOutBoard]: The parsed response data. """ - return self._parse_many(InOutBoard, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + InOutBoard, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InOutBoard: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InOutBoard: """ Performs a POST request against the /system/inOutBoards endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InOutBoard: The parsed response data. """ - return self._parse_one(InOutBoard, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + InOutBoard, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInOutBoardsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInOutBoardsIdEndpoint.py index 1be3b1275..aa385faa2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInOutBoardsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInOutBoardsIdEndpoint.py @@ -10,7 +10,9 @@ class SystemInoutboardsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[InOutBoard]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[InOutBoard]: """ Performs a GET request against the /system/inOutBoards/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InOutBoard: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InOutBoard: """ Performs a GET request against the /system/inOutBoards/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InOutBoard: The parsed response data. """ - return self._parse_one(InOutBoard, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InOutBoard, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/inOutBoards/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InOutBoard: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InOutBoard: """ Performs a PUT request against the /system/inOutBoards/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InOutBoard: The parsed response data. """ - return self._parse_one(InOutBoard, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + InOutBoard, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InOutBoard: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InOutBoard: """ Performs a PATCH request against the /system/inOutBoards/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InOutBoard: The parsed response data. """ - return self._parse_one(InOutBoard, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + InOutBoard, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInOutTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInOutTypesCountEndpoint.py index 0780c427d..ca5abb061 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInOutTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInOutTypesCountEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInouttypesCountInfoEndpoint import SystemInouttypesCountInfoEndpoint +from pyconnectwise.endpoints.manage.SystemInouttypesCountInfoEndpoint import ( + SystemInouttypesCountInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Count from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemInouttypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemInouttypesCountInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemInouttypesCountInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/inOutTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/inOutTypes/count endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInOutTypesCountInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInOutTypesCountInfoEndpoint.py index a2b544f27..8b19043a3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInOutTypesCountInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInOutTypesCountInfoEndpoint.py @@ -10,7 +10,9 @@ class SystemInouttypesCountInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/inOutTypes/count/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/inOutTypes/count/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInOutTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInOutTypesEndpoint.py index bf4a2b368..256890fd6 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInOutTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInOutTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInouttypesCountEndpoint import SystemInouttypesCountEndpoint -from pyconnectwise.endpoints.manage.SystemInouttypesIdEndpoint import SystemInouttypesIdEndpoint -from pyconnectwise.endpoints.manage.SystemInouttypesInfoEndpoint import SystemInouttypesInfoEndpoint +from pyconnectwise.endpoints.manage.SystemInouttypesCountEndpoint import ( + SystemInouttypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInouttypesIdEndpoint import ( + SystemInouttypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInouttypesInfoEndpoint import ( + SystemInouttypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InOutType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemInouttypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "inOutTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemInouttypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemInouttypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemInouttypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemInouttypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemInouttypesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> SystemInouttypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[InOutType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[InOutType]: """ Performs a GET request against the /system/inOutTypes endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[InOutType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[InOutType]: """ Performs a GET request against the /system/inOutTypes endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[InOutType]: The parsed response data. """ - return self._parse_many(InOutType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + InOutType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InOutType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InOutType: """ Performs a POST request against the /system/inOutTypes endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InOutType: The parsed response data. """ - return self._parse_one(InOutType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + InOutType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInOutTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInOutTypesIdEndpoint.py index 8b52687c6..46140dd55 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInOutTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInOutTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInouttypesIdInfoEndpoint import SystemInouttypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemInouttypesIdInfoEndpoint import ( + SystemInouttypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import InOutType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemInouttypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemInouttypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemInouttypesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[InOutType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[InOutType]: """ Performs a GET request against the /system/inOutTypes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InOutType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InOutType: """ Performs a GET request against the /system/inOutTypes/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InOutType: The parsed response data. """ - return self._parse_one(InOutType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InOutType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/inOutTypes/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InOutType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InOutType: """ Performs a PUT request against the /system/inOutTypes/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InOutType: The parsed response data. """ - return self._parse_one(InOutType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + InOutType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InOutType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InOutType: """ Performs a PATCH request against the /system/inOutTypes/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: InOutType: The parsed response data. """ - return self._parse_one(InOutType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + InOutType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInOutTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInOutTypesIdInfoEndpoint.py index 1b5c81861..4b0a83257 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInOutTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInOutTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> InOutTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> InOutTypeInfo: """ Performs a GET request against the /system/inOutTypes/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: InOutTypeInfo: The parsed response data. """ - return self._parse_one(InOutTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + InOutTypeInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInOutTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInOutTypesInfoEndpoint.py index 0f1c0f6ad..6642c5d2d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInOutTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInOutTypesInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[InOutTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[InOutTypeInfo]: """ Performs a GET request against the /system/inOutTypes/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[InOutTypeInfo]: The parsed response data. """ - return self._parse_many(InOutTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + InOutTypeInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsCountEndpoint.py index 934f4daab..2a2fa5752 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoDepartmentlocationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/info/departmentlocations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/info/departmentlocations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsEndpoint.py index bdc45cd7e..5f9f23099 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoDepartmentlocationsCountEndpoint import \ - SystemInfoDepartmentlocationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemInfoDepartmentlocationsIdEndpoint import \ - SystemInfoDepartmentlocationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemInfoDepartmentlocationsCountEndpoint import ( + SystemInfoDepartmentlocationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoDepartmentlocationsIdEndpoint import ( + SystemInfoDepartmentlocationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DepartmentLocationInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> SystemInfoDepartmentlocationsIdEndpoint: Returns: SystemInfoDepartmentlocationsIdEndpoint: The initialized SystemInfoDepartmentlocationsIdEndpoint object. """ - child = SystemInfoDepartmentlocationsIdEndpoint(self.client, parent_endpoint=self) + child = SystemInfoDepartmentlocationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DepartmentLocationInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DepartmentLocationInfo]: """ Performs a GET request against the /system/info/departmentlocations endpoint. @@ -64,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DepartmentLocationInfo]: The parsed response data. """ - return self._parse_many(DepartmentLocationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DepartmentLocationInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsIdEndpoint.py index b6a340ccc..7dd011514 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentlocationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DepartmentLocationInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DepartmentLocationInfo: """ Performs a GET request against the /system/info/departmentlocations/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DepartmentLocationInfo: The parsed response data. """ - return self._parse_one(DepartmentLocationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DepartmentLocationInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsCountEndpoint.py index 14ca95a29..835bda139 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoDepartmentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/info/departments/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/info/departments/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsEndpoint.py index a3aa4044a..16caf7a2e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoDepartmentsCountEndpoint import SystemInfoDepartmentsCountEndpoint -from pyconnectwise.endpoints.manage.SystemInfoDepartmentsIdEndpoint import SystemInfoDepartmentsIdEndpoint +from pyconnectwise.endpoints.manage.SystemInfoDepartmentsCountEndpoint import ( + SystemInfoDepartmentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoDepartmentsIdEndpoint import ( + SystemInfoDepartmentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DepartmentInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemInfoDepartmentsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "departments", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemInfoDepartmentsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemInfoDepartmentsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemInfoDepartmentsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DepartmentInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DepartmentInfo]: """ Performs a GET request against the /system/info/departments endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DepartmentInfo]: The parsed response data. """ - return self._parse_many(DepartmentInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DepartmentInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsIdEndpoint.py index 3a8d2bf28..6e2dcf176 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoDepartmentsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DepartmentInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DepartmentInfo: """ Performs a GET request against the /system/info/departments/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DepartmentInfo: The parsed response data. """ - return self._parse_one(DepartmentInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DepartmentInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoEndpoint.py index dfcef71d2..529d8a6b9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoEndpoint.py @@ -1,14 +1,30 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoDepartmentlocationsEndpoint import SystemInfoDepartmentlocationsEndpoint -from pyconnectwise.endpoints.manage.SystemInfoDepartmentsEndpoint import SystemInfoDepartmentsEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLinksEndpoint import SystemInfoLinksEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLocalesEndpoint import SystemInfoLocalesEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLocationsEndpoint import SystemInfoLocationsEndpoint -from pyconnectwise.endpoints.manage.SystemInfoMembersEndpoint import SystemInfoMembersEndpoint -from pyconnectwise.endpoints.manage.SystemInfoPersonasEndpoint import SystemInfoPersonasEndpoint -from pyconnectwise.endpoints.manage.SystemInfoStandardnotesEndpoint import SystemInfoStandardnotesEndpoint +from pyconnectwise.endpoints.manage.SystemInfoDepartmentlocationsEndpoint import ( + SystemInfoDepartmentlocationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoDepartmentsEndpoint import ( + SystemInfoDepartmentsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoLinksEndpoint import ( + SystemInfoLinksEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoLocalesEndpoint import ( + SystemInfoLocalesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoLocationsEndpoint import ( + SystemInfoLocationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoMembersEndpoint import ( + SystemInfoMembersEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoPersonasEndpoint import ( + SystemInfoPersonasEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoStandardnotesEndpoint import ( + SystemInfoStandardnotesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Info from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -18,20 +34,34 @@ class SystemInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.departments = self._register_child_endpoint(SystemInfoDepartmentsEndpoint(client, parent_endpoint=self)) - self.locations = self._register_child_endpoint(SystemInfoLocationsEndpoint(client, parent_endpoint=self)) - self.members = self._register_child_endpoint(SystemInfoMembersEndpoint(client, parent_endpoint=self)) - self.standard_notes = self._register_child_endpoint( - SystemInfoStandardnotesEndpoint(client, parent_endpoint=self) + self.members = self._register_child_endpoint( + SystemInfoMembersEndpoint(client, parent_endpoint=self) + ) + self.links = self._register_child_endpoint( + SystemInfoLinksEndpoint(client, parent_endpoint=self) + ) + self.locales = self._register_child_endpoint( + SystemInfoLocalesEndpoint(client, parent_endpoint=self) ) - self.personas = self._register_child_endpoint(SystemInfoPersonasEndpoint(client, parent_endpoint=self)) self.departmentlocations = self._register_child_endpoint( SystemInfoDepartmentlocationsEndpoint(client, parent_endpoint=self) ) - self.links = self._register_child_endpoint(SystemInfoLinksEndpoint(client, parent_endpoint=self)) - self.locales = self._register_child_endpoint(SystemInfoLocalesEndpoint(client, parent_endpoint=self)) + self.departments = self._register_child_endpoint( + SystemInfoDepartmentsEndpoint(client, parent_endpoint=self) + ) + self.standard_notes = self._register_child_endpoint( + SystemInfoStandardnotesEndpoint(client, parent_endpoint=self) + ) + self.locations = self._register_child_endpoint( + SystemInfoLocationsEndpoint(client, parent_endpoint=self) + ) + self.personas = self._register_child_endpoint( + SystemInfoPersonasEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Info]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Info]: """ Performs a GET request against the /system/info endpoint and returns an initialized PaginatedResponse object. @@ -62,4 +92,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: Info: The parsed response data. """ - return self._parse_one(Info, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Info, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLinksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLinksCountEndpoint.py index 5916f295e..1e8826f05 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLinksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLinksCountEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoLinksCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/info/links/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/info/links/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLinksEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLinksEndpoint.py index 25a1a1907..e6cfbf417 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLinksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLinksEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLinksCountEndpoint import SystemInfoLinksCountEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLinksIdEndpoint import SystemInfoLinksIdEndpoint +from pyconnectwise.endpoints.manage.SystemInfoLinksCountEndpoint import ( + SystemInfoLinksCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoLinksIdEndpoint import ( + SystemInfoLinksIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LinkInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemInfoLinksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "links", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemInfoLinksCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemInfoLinksCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemInfoLinksIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemInfoLinksIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[LinkInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[LinkInfo]: """ Performs a GET request against the /system/info/links endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LinkInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LinkInfo]: """ Performs a GET request against the /system/info/links endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LinkInfo]: The parsed response data. """ - return self._parse_many(LinkInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LinkInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLinksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLinksIdEndpoint.py index e358b9119..6a5fc1a88 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLinksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLinksIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLinksIdResolveurlEndpoint import SystemInfoLinksIdResolveurlEndpoint +from pyconnectwise.endpoints.manage.SystemInfoLinksIdResolveurlEndpoint import ( + SystemInfoLinksIdResolveurlEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LinkInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): SystemInfoLinksIdResolveurlEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[LinkInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[LinkInfo]: """ Performs a GET request against the /system/info/links/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LinkInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LinkInfo: """ Performs a GET request against the /system/info/links/{id} endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LinkInfo: The parsed response data. """ - return self._parse_one(LinkInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LinkInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLinksIdResolveurlEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLinksIdResolveurlEndpoint.py index 09559584b..f4e9613b8 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLinksIdResolveurlEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLinksIdResolveurlEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoLinksIdResolveurlEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "resolveurl", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LinkResolveUrlInfo: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LinkResolveUrlInfo: """ Performs a POST request against the /system/info/links/{id}/resolveurl endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: LinkResolveUrlInfo: The parsed response data. """ - return self._parse_one(LinkResolveUrlInfo, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + LinkResolveUrlInfo, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLocalesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLocalesCountEndpoint.py index 2e846a10c..0f75f0694 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLocalesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLocalesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoLocalesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/info/locales/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/info/locales/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLocalesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLocalesEndpoint.py index ad2abc70c..f9baf7bd7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLocalesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLocalesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLocalesCountEndpoint import SystemInfoLocalesCountEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLocalesIdEndpoint import SystemInfoLocalesIdEndpoint +from pyconnectwise.endpoints.manage.SystemInfoLocalesCountEndpoint import ( + SystemInfoLocalesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoLocalesIdEndpoint import ( + SystemInfoLocalesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LocaleInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemInfoLocalesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "locales", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemInfoLocalesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemInfoLocalesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemInfoLocalesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemInfoLocalesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[LocaleInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[LocaleInfo]: """ Performs a GET request against the /system/info/locales endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LocaleInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LocaleInfo]: """ Performs a GET request against the /system/info/locales endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LocaleInfo]: The parsed response data. """ - return self._parse_many(LocaleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LocaleInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLocalesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLocalesIdEndpoint.py index 53e60697e..fb3e604f1 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLocalesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLocalesIdEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoLocalesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[LocaleInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[LocaleInfo]: """ Performs a GET request against the /system/info/locales/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LocaleInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LocaleInfo: """ Performs a GET request against the /system/info/locales/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LocaleInfo: The parsed response data. """ - return self._parse_one(LocaleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LocaleInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLocationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLocationsCountEndpoint.py index 45e94c8ed..216af387c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLocationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLocationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoLocationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/info/locations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/info/locations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLocationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLocationsEndpoint.py index b1000c29a..a3c55f5fc 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLocationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLocationsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLocationsCountEndpoint import SystemInfoLocationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemInfoLocationsIdEndpoint import SystemInfoLocationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemInfoLocationsCountEndpoint import ( + SystemInfoLocationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoLocationsIdEndpoint import ( + SystemInfoLocationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LocationInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemInfoLocationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "locations", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemInfoLocationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemInfoLocationsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemInfoLocationsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LocationInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LocationInfo]: """ Performs a GET request against the /system/info/locations endpoint. @@ -60,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LocationInfo]: The parsed response data. """ - return self._parse_many(LocationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LocationInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoLocationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoLocationsIdEndpoint.py index c76695196..54d84160e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoLocationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoLocationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LocationInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LocationInfo: """ Performs a GET request against the /system/info/locations/{id} endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LocationInfo: The parsed response data. """ - return self._parse_one(LocationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LocationInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoMembersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoMembersCountEndpoint.py index 84f44c3c0..4bf35080a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoMembersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoMembersCountEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoMembersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/info/members/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/info/members/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoMembersEndpoint.py index 83aacbc5c..538abdcdf 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoMembersEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoMembersCountEndpoint import SystemInfoMembersCountEndpoint -from pyconnectwise.endpoints.manage.SystemInfoMembersIdEndpoint import SystemInfoMembersIdEndpoint +from pyconnectwise.endpoints.manage.SystemInfoMembersCountEndpoint import ( + SystemInfoMembersCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoMembersIdEndpoint import ( + SystemInfoMembersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemInfoMembersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "members", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemInfoMembersCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemInfoMembersCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemInfoMembersIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemInfoMembersIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MemberInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MemberInfo]: """ Performs a GET request against the /system/info/members endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberInfo]: """ Performs a GET request against the /system/info/members endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberInfo]: The parsed response data. """ - return self._parse_many(MemberInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoMembersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoMembersIdEndpoint.py index a81776109..c21fd5439 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoMembersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoMembersIdEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoMembersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MemberInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MemberInfo]: """ Performs a GET request against the /system/info/members/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberInfo: """ Performs a GET request against the /system/info/members/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberInfo: The parsed response data. """ - return self._parse_one(MemberInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoPersonasCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoPersonasCountEndpoint.py index bf05af874..cbce7d86d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoPersonasCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoPersonasCountEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoPersonasCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/info/personas/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/info/personas/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoPersonasEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoPersonasEndpoint.py index 27f3be3ea..a3f99d219 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoPersonasEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoPersonasEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoPersonasCountEndpoint import SystemInfoPersonasCountEndpoint -from pyconnectwise.endpoints.manage.SystemInfoPersonasIdEndpoint import SystemInfoPersonasIdEndpoint +from pyconnectwise.endpoints.manage.SystemInfoPersonasCountEndpoint import ( + SystemInfoPersonasCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoPersonasIdEndpoint import ( + SystemInfoPersonasIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PersonasInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemInfoPersonasEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "personas", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemInfoPersonasCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemInfoPersonasCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemInfoPersonasIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PersonasInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PersonasInfo]: """ Performs a GET request against the /system/info/personas endpoint. @@ -60,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PersonasInfo]: The parsed response data. """ - return self._parse_many(PersonasInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PersonasInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoPersonasIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoPersonasIdEndpoint.py index 05801ad46..7c33ac98f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoPersonasIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoPersonasIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PersonasInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PersonasInfo: """ Performs a GET request against the /system/info/personas/{id} endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PersonasInfo: The parsed response data. """ - return self._parse_one(PersonasInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PersonasInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesCountEndpoint.py index 61f2699ef..85dd2d183 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemInfoStandardnotesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/info/standardNotes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/info/standardNotes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesEndpoint.py index a05609906..69a8f62ee 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemInfoStandardnotesCountEndpoint import SystemInfoStandardnotesCountEndpoint -from pyconnectwise.endpoints.manage.SystemInfoStandardnotesIdEndpoint import SystemInfoStandardnotesIdEndpoint +from pyconnectwise.endpoints.manage.SystemInfoStandardnotesCountEndpoint import ( + SystemInfoStandardnotesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemInfoStandardnotesIdEndpoint import ( + SystemInfoStandardnotesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import StandardNoteInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemInfoStandardnotesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "standardNotes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemInfoStandardnotesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemInfoStandardnotesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemInfoStandardnotesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[StandardNoteInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[StandardNoteInfo]: """ Performs a GET request against the /system/info/standardNotes endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[StandardNoteInfo]: The parsed response data. """ - return self._parse_many(StandardNoteInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + StandardNoteInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesIdEndpoint.py index 5b417e065..0a9e780e8 100644 --- a/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemInfoStandardNotesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> StandardNoteInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> StandardNoteInfo: """ Performs a GET request against the /system/info/standardNotes/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: StandardNoteInfo: The parsed response data. """ - return self._parse_one(StandardNoteInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + StandardNoteInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsCountEndpoint.py index cc1b5f636..d68ffc8ff 100644 --- a/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemIntegratortagsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/integratorTags/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/integratorTags/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsEndpoint.py index ae1f9a828..ca54169c7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemIntegratortagsCountEndpoint import SystemIntegratortagsCountEndpoint -from pyconnectwise.endpoints.manage.SystemIntegratortagsIdEndpoint import SystemIntegratortagsIdEndpoint +from pyconnectwise.endpoints.manage.SystemIntegratortagsCountEndpoint import ( + SystemIntegratortagsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemIntegratortagsIdEndpoint import ( + SystemIntegratortagsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import IntegratorTag from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemIntegratortagsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "integratorTags", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemIntegratortagsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemIntegratortagsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemIntegratortagsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[IntegratorTag]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[IntegratorTag]: """ Performs a GET request against the /system/integratorTags endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[IntegratorTag]: The parsed response data. """ - return self._parse_many(IntegratorTag, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + IntegratorTag, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> IntegratorTag: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> IntegratorTag: """ Performs a POST request against the /system/integratorTags endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: IntegratorTag: The parsed response data. """ - return self._parse_one(IntegratorTag, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + IntegratorTag, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsIdEndpoint.py index a416fc307..055052d73 100644 --- a/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemIntegratorTagsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> IntegratorTag: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> IntegratorTag: """ Performs a GET request against the /system/integratorTags/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: IntegratorTag: The parsed response data. """ - return self._parse_one(IntegratorTag, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + IntegratorTag, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/integratorTags/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> IntegratorTag: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> IntegratorTag: """ Performs a PUT request against the /system/integratorTags/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: IntegratorTag: The parsed response data. """ - return self._parse_one(IntegratorTag, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + IntegratorTag, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> IntegratorTag: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> IntegratorTag: """ Performs a PATCH request against the /system/integratorTags/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: IntegratorTag: The parsed response data. """ - return self._parse_one(IntegratorTag, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + IntegratorTag, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsCountEndpoint.py index 43ec724a8..bc983d61e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemIntegratorloginsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/integratorlogins/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/integratorlogins/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsEndpoint.py index 44018ff00..6797986e6 100644 --- a/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemIntegratorloginsCountEndpoint import SystemIntegratorloginsCountEndpoint -from pyconnectwise.endpoints.manage.SystemIntegratorloginsIdEndpoint import SystemIntegratorloginsIdEndpoint +from pyconnectwise.endpoints.manage.SystemIntegratorloginsCountEndpoint import ( + SystemIntegratorloginsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemIntegratorloginsIdEndpoint import ( + SystemIntegratorloginsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import IntegratorLogin from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemIntegratorloginsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "integratorlogins", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemIntegratorloginsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemIntegratorloginsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemIntegratorloginsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[IntegratorLogin]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[IntegratorLogin]: """ Performs a GET request against the /system/integratorlogins endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[IntegratorLogin]: The parsed response data. """ - return self._parse_many(IntegratorLogin, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + IntegratorLogin, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> IntegratorLogin: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> IntegratorLogin: """ Performs a POST request against the /system/integratorlogins endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: IntegratorLogin: The parsed response data. """ - return self._parse_one(IntegratorLogin, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + IntegratorLogin, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsIdEndpoint.py index 732bc8aca..6a161e952 100644 --- a/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemIntegratorloginsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> IntegratorLogin: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> IntegratorLogin: """ Performs a GET request against the /system/integratorlogins/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: IntegratorLogin: The parsed response data. """ - return self._parse_one(IntegratorLogin, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + IntegratorLogin, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/integratorlogins/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> IntegratorLogin: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> IntegratorLogin: """ Performs a PUT request against the /system/integratorlogins/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> I Returns: IntegratorLogin: The parsed response data. """ - return self._parse_one(IntegratorLogin, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + IntegratorLogin, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> IntegratorLogin: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> IntegratorLogin: """ Performs a PATCH request against the /system/integratorlogins/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: IntegratorLogin: The parsed response data. """ - return self._parse_one(IntegratorLogin, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + IntegratorLogin, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesCountEndpoint.py index 6aae678db..185204597 100644 --- a/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemKpicategoriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/kpiCategories/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/kpiCategories/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesEndpoint.py index 743f88f21..f89008eb0 100644 --- a/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemKpicategoriesCountEndpoint import SystemKpicategoriesCountEndpoint -from pyconnectwise.endpoints.manage.SystemKpicategoriesIdEndpoint import SystemKpicategoriesIdEndpoint +from pyconnectwise.endpoints.manage.SystemKpicategoriesCountEndpoint import ( + SystemKpicategoriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemKpicategoriesIdEndpoint import ( + SystemKpicategoriesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import KPICategory from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemKpicategoriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "kpiCategories", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemKpicategoriesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemKpicategoriesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemKpicategoriesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemKpicategoriesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[KPICategory]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[KPICategory]: """ Performs a GET request against the /system/kpiCategories endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[KPICategory]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[KPICategory]: """ Performs a GET request against the /system/kpiCategories endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[KPICategory]: The parsed response data. """ - return self._parse_many(KPICategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + KPICategory, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesIdEndpoint.py index 2f986e423..b5f632a17 100644 --- a/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemKpiCategoriesIdEndpoint.py @@ -10,7 +10,9 @@ class SystemKpicategoriesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[KPICategory]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[KPICategory]: """ Performs a GET request against the /system/kpiCategories/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> KPICategory: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> KPICategory: """ Performs a GET request against the /system/kpiCategories/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KPICategory: The parsed response data. """ - return self._parse_one(KPICategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + KPICategory, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemKpisCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemKpisCountEndpoint.py index a400144a2..88ba1b75c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemKpisCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemKpisCountEndpoint.py @@ -10,7 +10,9 @@ class SystemKpisCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/kpis/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/kpis/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemKpisEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemKpisEndpoint.py index 48df02af2..5dff1b9e3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemKpisEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemKpisEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemKpisCountEndpoint import SystemKpisCountEndpoint +from pyconnectwise.endpoints.manage.SystemKpisCountEndpoint import ( + SystemKpisCountEndpoint, +) from pyconnectwise.endpoints.manage.SystemKpisIdEndpoint import SystemKpisIdEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import KPI @@ -12,7 +14,9 @@ class SystemKpisEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "kpis", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemKpisCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemKpisCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemKpisIdEndpoint: """ @@ -27,7 +31,9 @@ def id(self, id: int) -> SystemKpisIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[KPI]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[KPI]: """ Performs a GET request against the /system/kpis endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +54,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[KPI]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[KPI]: """ Performs a GET request against the /system/kpis endpoint. @@ -58,4 +66,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[KPI]: The parsed response data. """ - return self._parse_many(KPI, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + KPI, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemKpisIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemKpisIdEndpoint.py index ea9fe3b49..b71a090c6 100644 --- a/src/pyconnectwise/endpoints/manage/SystemKpisIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemKpisIdEndpoint.py @@ -10,7 +10,9 @@ class SystemKpisIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[KPI]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[KPI]: """ Performs a GET request against the /system/kpis/{id} endpoint and returns an initialized PaginatedResponse object. @@ -41,4 +43,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> K Returns: KPI: The parsed response data. """ - return self._parse_one(KPI, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + KPI, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsCountEndpoint.py index 8fa764bf7..35c6ae198 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemLdapconfigurationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/ldapConfigurations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/ldapConfigurations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsEndpoint.py index 8abff8962..16436ac6b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsEndpoint.py @@ -1,11 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemLdapconfigurationsCountEndpoint import SystemLdapconfigurationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemLdapconfigurationsIdEndpoint import SystemLdapconfigurationsIdEndpoint -from pyconnectwise.endpoints.manage.SystemLdapconfigurationsInfoEndpoint import SystemLdapconfigurationsInfoEndpoint -from pyconnectwise.endpoints.manage.SystemLdapconfigurationsTestlinkEndpoint import \ - SystemLdapconfigurationsTestlinkEndpoint +from pyconnectwise.endpoints.manage.SystemLdapconfigurationsCountEndpoint import ( + SystemLdapconfigurationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemLdapconfigurationsIdEndpoint import ( + SystemLdapconfigurationsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemLdapconfigurationsInfoEndpoint import ( + SystemLdapconfigurationsInfoEndpoint, +) +from pyconnectwise.endpoints.manage.SystemLdapconfigurationsTestlinkEndpoint import ( + SystemLdapconfigurationsTestlinkEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LdapConfiguration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,8 +22,12 @@ class SystemLdapconfigurationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "ldapConfigurations", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemLdapconfigurationsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemLdapconfigurationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemLdapconfigurationsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemLdapconfigurationsInfoEndpoint(client, parent_endpoint=self) + ) self.test_link = self._register_child_endpoint( SystemLdapconfigurationsTestlinkEndpoint(client, parent_endpoint=self) ) @@ -57,7 +68,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LdapConfiguration]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LdapConfiguration]: """ Performs a GET request against the /system/ldapConfigurations endpoint. @@ -67,9 +80,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LdapConfiguration]: The parsed response data. """ - return self._parse_many(LdapConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LdapConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LdapConfiguration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LdapConfiguration: """ Performs a POST request against the /system/ldapConfigurations endpoint. @@ -79,4 +97,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: LdapConfiguration: The parsed response data. """ - return self._parse_one(LdapConfiguration, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + LdapConfiguration, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsIdEndpoint.py index 69aee0915..2373fbf29 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemLdapconfigurationsIdInfoEndpoint import SystemLdapconfigurationsIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemLdapconfigurationsIdInfoEndpoint import ( + SystemLdapconfigurationsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LdapConfiguration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemLdapconfigurationsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemLdapconfigurationsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemLdapconfigurationsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LdapConfiguration: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LdapConfiguration: """ Performs a GET request against the /system/ldapConfigurations/{id} endpoint. @@ -46,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LdapConfiguration: The parsed response data. """ - return self._parse_one(LdapConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LdapConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/ldapConfigurations/{id} endpoint. @@ -58,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LdapConfiguration: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LdapConfiguration: """ Performs a PUT request against the /system/ldapConfigurations/{id} endpoint. @@ -70,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LdapConfiguration: The parsed response data. """ - return self._parse_one(LdapConfiguration, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + LdapConfiguration, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LdapConfiguration: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LdapConfiguration: """ Performs a PATCH request against the /system/ldapConfigurations/{id} endpoint. @@ -82,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: LdapConfiguration: The parsed response data. """ - return self._parse_one(LdapConfiguration, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + LdapConfiguration, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsIdInfoEndpoint.py index 84cd7e611..0f62a56df 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LdapConfigurationInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LdapConfigurationInfo: """ Performs a GET request against the /system/ldapConfigurations/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LdapConfigurationInfo: The parsed response data. """ - return self._parse_one(LdapConfigurationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LdapConfigurationInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsInfoCountEndpoint.py index 2a8d3a391..0f786ce54 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemLdapconfigurationsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/ldapConfigurations/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/ldapConfigurations/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsInfoEndpoint.py index ef9d693b0..5d633a460 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemLdapconfigurationsInfoCountEndpoint import \ - SystemLdapconfigurationsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemLdapconfigurationsInfoCountEndpoint import ( + SystemLdapconfigurationsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LdapConfigurationInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LdapConfigurationInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LdapConfigurationInfo]: """ Performs a GET request against the /system/ldapConfigurations/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LdapConfigurationInfo]: The parsed response data. """ - return self._parse_many(LdapConfigurationInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LdapConfigurationInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsTestLinkEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsTestLinkEndpoint.py index 4f2cf789d..9a5131e1b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsTestLinkEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLdapConfigurationsTestLinkEndpoint.py @@ -10,7 +10,9 @@ class SystemLdapconfigurationsTestlinkEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "testLink", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/ldapConfigurations/testLink endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLinksCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLinksCountEndpoint.py index 5e72b5b2e..70df30571 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLinksCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLinksCountEndpoint.py @@ -10,7 +10,9 @@ class SystemLinksCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/links/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/links/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLinksEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLinksEndpoint.py index 32360796d..719b78746 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLinksEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLinksEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemLinksCountEndpoint import SystemLinksCountEndpoint +from pyconnectwise.endpoints.manage.SystemLinksCountEndpoint import ( + SystemLinksCountEndpoint, +) from pyconnectwise.endpoints.manage.SystemLinksIdEndpoint import SystemLinksIdEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Link @@ -12,7 +14,9 @@ class SystemLinksEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "links", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemLinksCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemLinksCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemLinksIdEndpoint: """ @@ -27,7 +31,9 @@ def id(self, id: int) -> SystemLinksIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Link]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Link]: """ Performs a GET request against the /system/links endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +54,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Link]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Link]: """ Performs a GET request against the /system/links endpoint. @@ -58,9 +66,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Link]: The parsed response data. """ - return self._parse_many(Link, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Link, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Link: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Link: """ Performs a POST request against the /system/links endpoint. @@ -70,4 +82,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Link: The parsed response data. """ - return self._parse_one(Link, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Link, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLinksIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLinksIdEndpoint.py index 31ab67195..399a51512 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLinksIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLinksIdEndpoint.py @@ -10,7 +10,9 @@ class SystemLinksIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Link]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Link]: """ Performs a GET request against the /system/links/{id} endpoint and returns an initialized PaginatedResponse object. @@ -41,9 +43,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: Link: The parsed response data. """ - return self._parse_one(Link, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Link, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/links/{id} endpoint. @@ -53,7 +59,10 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Link: """ @@ -65,9 +74,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: Link: The parsed response data. """ - return self._parse_one(Link, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Link, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Link: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Link: """ Performs a PATCH request against the /system/links/{id} endpoint. @@ -77,4 +90,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Link: The parsed response data. """ - return self._parse_one(Link, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Link, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsCountEndpoint.py index 59b96df3d..03b78f79a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemLocationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/locations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/locations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsEndpoint.py index 261b582ca..bba4bdc78 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsCountEndpoint import SystemLocationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsIdEndpoint import SystemLocationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemLocationsCountEndpoint import ( + SystemLocationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemLocationsIdEndpoint import ( + SystemLocationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Location from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemLocationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "locations", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemLocationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemLocationsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemLocationsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemLocationsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Location]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Location]: """ Performs a GET request against the /system/locations endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Location]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Location]: """ Performs a GET request against the /system/locations endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Location]: The parsed response data. """ - return self._parse_many(Location, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Location, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Location: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Location: """ Performs a POST request against the /system/locations endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Location: The parsed response data. """ - return self._parse_one(Location, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Location, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsCountEndpoint.py index a03a317d4..7016f1e62 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemLocationsIdDepartmentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/locations/{id}/departments/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/locations/{id}/departments/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsEndpoint.py index 20028fd31..b82877d05 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsIdDepartmentsCountEndpoint import \ - SystemLocationsIdDepartmentsCountEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsIdDepartmentsIdEndpoint import SystemLocationsIdDepartmentsIdEndpoint +from pyconnectwise.endpoints.manage.SystemLocationsIdDepartmentsCountEndpoint import ( + SystemLocationsIdDepartmentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemLocationsIdDepartmentsIdEndpoint import ( + SystemLocationsIdDepartmentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LocationDepartment from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> SystemLocationsIdDepartmentsIdEndpoint: Returns: SystemLocationsIdDepartmentsIdEndpoint: The initialized SystemLocationsIdDepartmentsIdEndpoint object. """ - child = SystemLocationsIdDepartmentsIdEndpoint(self.client, parent_endpoint=self) + child = SystemLocationsIdDepartmentsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LocationDepartment]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LocationDepartment]: """ Performs a GET request against the /system/locations/{id}/departments endpoint. @@ -63,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LocationDepartment]: The parsed response data. """ - return self._parse_many(LocationDepartment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LocationDepartment, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsIdEndpoint.py index 1c5b4c278..6f4017806 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsIdDepartmentsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LocationDepartment: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LocationDepartment: """ Performs a GET request against the /system/locations/{id}/departments/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LocationDepartment: The parsed response data. """ - return self._parse_one(LocationDepartment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LocationDepartment, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsIdEndpoint.py index 0b6869144..1b894fb9d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsIdEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsIdDepartmentsEndpoint import SystemLocationsIdDepartmentsEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsIdUsagesEndpoint import SystemLocationsIdUsagesEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsIdWorkrolesEndpoint import SystemLocationsIdWorkrolesEndpoint +from pyconnectwise.endpoints.manage.SystemLocationsIdDepartmentsEndpoint import ( + SystemLocationsIdDepartmentsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemLocationsIdUsagesEndpoint import ( + SystemLocationsIdUsagesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemLocationsIdWorkrolesEndpoint import ( + SystemLocationsIdWorkrolesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Location from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,15 +19,19 @@ class SystemLocationsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) + self.usages = self._register_child_endpoint( + SystemLocationsIdUsagesEndpoint(client, parent_endpoint=self) + ) self.departments = self._register_child_endpoint( SystemLocationsIdDepartmentsEndpoint(client, parent_endpoint=self) ) self.work_roles = self._register_child_endpoint( SystemLocationsIdWorkrolesEndpoint(client, parent_endpoint=self) ) - self.usages = self._register_child_endpoint(SystemLocationsIdUsagesEndpoint(client, parent_endpoint=self)) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Location]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Location]: """ Performs a GET request against the /system/locations/{id} endpoint and returns an initialized PaginatedResponse object. @@ -42,7 +52,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Location: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Location: """ Performs a GET request against the /system/locations/{id} endpoint. @@ -52,9 +64,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: Location: The parsed response data. """ - return self._parse_one(Location, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Location, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/locations/{id} endpoint. @@ -64,9 +80,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Location: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Location: """ Performs a PUT request against the /system/locations/{id} endpoint. @@ -76,9 +97,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: Location: The parsed response data. """ - return self._parse_one(Location, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Location, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Location: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Location: """ Performs a PATCH request against the /system/locations/{id} endpoint. @@ -88,4 +113,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Location: The parsed response data. """ - return self._parse_one(Location, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Location, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsIdUsagesEndpoint.py index d75246ea7..55b730eea 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsIdUsagesListEndpoint import SystemLocationsIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SystemLocationsIdUsagesListEndpoint import ( + SystemLocationsIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemLocationsIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(SystemLocationsIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + SystemLocationsIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /system/locations/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /system/locations/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsIdUsagesListEndpoint.py index 65ad062ec..1076da47a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SystemLocationsIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /system/locations/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /system/locations/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesCountEndpoint.py index 1ca34d51f..6e26a63d2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemLocationsIdWorkrolesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/locations/{id}/workRoles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/locations/{id}/workRoles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesEndpoint.py index 8ce101d81..c835622c9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsIdWorkrolesCountEndpoint import \ - SystemLocationsIdWorkrolesCountEndpoint -from pyconnectwise.endpoints.manage.SystemLocationsIdWorkrolesIdEndpoint import SystemLocationsIdWorkrolesIdEndpoint +from pyconnectwise.endpoints.manage.SystemLocationsIdWorkrolesCountEndpoint import ( + SystemLocationsIdWorkrolesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemLocationsIdWorkrolesIdEndpoint import ( + SystemLocationsIdWorkrolesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import LocationWorkRole from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[LocationWorkRole]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[LocationWorkRole]: """ Performs a GET request against the /system/locations/{id}/workRoles endpoint. @@ -63,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[LocationWorkRole]: The parsed response data. """ - return self._parse_many(LocationWorkRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + LocationWorkRole, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesIdEndpoint.py index 27f2dcec7..38b3d9ac5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemLocationsIdWorkRolesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> LocationWorkRole: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> LocationWorkRole: """ Performs a GET request against the /system/locations/{id}/workRoles/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> L Returns: LocationWorkRole: The parsed response data. """ - return self._parse_one(LocationWorkRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + LocationWorkRole, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncCheckvalidsyncEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncCheckvalidsyncEndpoint.py index 8ba022d2d..ea69ef4b8 100644 --- a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncCheckvalidsyncEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncCheckvalidsyncEndpoint.py @@ -10,7 +10,9 @@ class SystemM365contactsyncCheckvalidsyncEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "checkvalidsync", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/m365contactsync/checkvalidsync endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncEndpoint.py index 12a41d869..5a5573867 100644 --- a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncEndpoint.py @@ -1,15 +1,24 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncAuthorizeEndpoint import SystemM365contactsyncAuthorizeEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncCheckvalidsyncEndpoint import \ - SystemM365contactsyncCheckvalidsyncEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncIdEndpoint import SystemM365contactsyncIdEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncInfoEndpoint import SystemM365contactsyncInfoEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncNotifydeactivationEndpoint import \ - SystemM365contactsyncNotifydeactivationEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncNotifyerrorEndpoint import \ - SystemM365contactsyncNotifyerrorEndpoint +from pyconnectwise.endpoints.manage.SystemM365contactsyncAuthorizeEndpoint import ( + SystemM365contactsyncAuthorizeEndpoint, +) +from pyconnectwise.endpoints.manage.SystemM365contactsyncCheckvalidsyncEndpoint import ( + SystemM365contactsyncCheckvalidsyncEndpoint, +) +from pyconnectwise.endpoints.manage.SystemM365contactsyncIdEndpoint import ( + SystemM365contactsyncIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemM365contactsyncInfoEndpoint import ( + SystemM365contactsyncInfoEndpoint, +) +from pyconnectwise.endpoints.manage.SystemM365contactsyncNotifydeactivationEndpoint import ( + SystemM365contactsyncNotifydeactivationEndpoint, +) +from pyconnectwise.endpoints.manage.SystemM365contactsyncNotifyerrorEndpoint import ( + SystemM365contactsyncNotifyerrorEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -18,19 +27,23 @@ class SystemM365contactsyncEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "m365contactsync", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemM365contactsyncInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemM365contactsyncInfoEndpoint(client, parent_endpoint=self) + ) + self.notifyerror = self._register_child_endpoint( + SystemM365contactsyncNotifyerrorEndpoint(client, parent_endpoint=self) + ) + self.notifydeactivation = self._register_child_endpoint( + SystemM365contactsyncNotifydeactivationEndpoint( + client, parent_endpoint=self + ) + ) self.authorize = self._register_child_endpoint( SystemM365contactsyncAuthorizeEndpoint(client, parent_endpoint=self) ) self.checkvalidsync = self._register_child_endpoint( SystemM365contactsyncCheckvalidsyncEndpoint(client, parent_endpoint=self) ) - self.notifydeactivation = self._register_child_endpoint( - SystemM365contactsyncNotifydeactivationEndpoint(client, parent_endpoint=self) - ) - self.notifyerror = self._register_child_endpoint( - SystemM365contactsyncNotifyerrorEndpoint(client, parent_endpoint=self) - ) def id(self, id: int) -> SystemM365contactsyncIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncIdEndpoint.py index 0c7aa55a4..a199dd854 100644 --- a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncIdEndpoint.py @@ -1,10 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncIdInfoEndpoint import SystemM365contactsyncIdInfoEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncIdTestEndpoint import SystemM365contactsyncIdTestEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncIdViewauthEndpoint import \ - SystemM365contactsyncIdViewauthEndpoint +from pyconnectwise.endpoints.manage.SystemM365contactsyncIdInfoEndpoint import ( + SystemM365contactsyncIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.SystemM365contactsyncIdTestEndpoint import ( + SystemM365contactsyncIdTestEndpoint, +) +from pyconnectwise.endpoints.manage.SystemM365contactsyncIdViewauthEndpoint import ( + SystemM365contactsyncIdViewauthEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +18,12 @@ class SystemM365contactsyncIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemM365contactsyncIdInfoEndpoint(client, parent_endpoint=self)) - self.test = self._register_child_endpoint(SystemM365contactsyncIdTestEndpoint(client, parent_endpoint=self)) self.viewauth = self._register_child_endpoint( SystemM365contactsyncIdViewauthEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + SystemM365contactsyncIdInfoEndpoint(client, parent_endpoint=self) + ) + self.test = self._register_child_endpoint( + SystemM365contactsyncIdTestEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncIdInfoEndpoint.py index 125717c10..13346a517 100644 --- a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M365ContactSyncInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> M365ContactSyncInfo: """ Performs a GET request against the /system/m365contactsync/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: M365ContactSyncInfo: The parsed response data. """ - return self._parse_one(M365ContactSyncInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + M365ContactSyncInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncInfoCountEndpoint.py index 0d0685191..29673e622 100644 --- a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemM365contactsyncInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/m365contactsync/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/m365contactsync/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncInfoEndpoint.py index e8b7658d6..2efcb7084 100644 --- a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemM365contactsyncInfoCountEndpoint import SystemM365contactsyncInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemM365contactsyncInfoCountEndpoint import ( + SystemM365contactsyncInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import M365ContactSyncInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemM365contactsyncInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemM365contactsyncInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemM365contactsyncInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[M365ContactSyncInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[M365ContactSyncInfo]: """ Performs a GET request against the /system/m365contactsync/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[M365ContactSyncInfo]: The parsed response data. """ - return self._parse_many(M365ContactSyncInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + M365ContactSyncInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncNotifydeactivationEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncNotifydeactivationEndpoint.py index f1e5cc21b..3ee1d556f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncNotifydeactivationEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncNotifydeactivationEndpoint.py @@ -10,7 +10,9 @@ class SystemM365contactsyncNotifydeactivationEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "notifydeactivation", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/m365contactsync/notifydeactivation endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncNotifyerrorEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncNotifyerrorEndpoint.py index df97ec157..8a91a41e2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemM365contactsyncNotifyerrorEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemM365contactsyncNotifyerrorEndpoint.py @@ -10,7 +10,9 @@ class SystemM365contactsyncNotifyerrorEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "notifyerror", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/m365contactsync/notifyerror endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesCountEndpoint.py index 2792865f8..f83dfea89 100644 --- a/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemManagementnetworksecuritiesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/managementNetworkSecurities/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/managementNetworkSecurities/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesEndpoint.py index c2f7a35d0..14d32e28b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemManagementnetworksecuritiesCountEndpoint import \ - SystemManagementnetworksecuritiesCountEndpoint -from pyconnectwise.endpoints.manage.SystemManagementnetworksecuritiesIdEndpoint import \ - SystemManagementnetworksecuritiesIdEndpoint +from pyconnectwise.endpoints.manage.SystemManagementnetworksecuritiesCountEndpoint import ( + SystemManagementnetworksecuritiesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemManagementnetworksecuritiesIdEndpoint import ( + SystemManagementnetworksecuritiesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagementNetworkSecurity from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +14,9 @@ class SystemManagementnetworksecuritiesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "managementNetworkSecurities", parent_endpoint=parent_endpoint) + super().__init__( + client, "managementNetworkSecurities", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( SystemManagementnetworksecuritiesCountEndpoint(client, parent_endpoint=self) @@ -27,7 +31,9 @@ def id(self, id: int) -> SystemManagementnetworksecuritiesIdEndpoint: Returns: SystemManagementnetworksecuritiesIdEndpoint: The initialized SystemManagementnetworksecuritiesIdEndpoint object. """ - child = SystemManagementnetworksecuritiesIdEndpoint(self.client, parent_endpoint=self) + child = SystemManagementnetworksecuritiesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagementNetworkSecurity]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagementNetworkSecurity]: """ Performs a GET request against the /system/managementNetworkSecurities endpoint. @@ -65,10 +73,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[ManagementNetworkSecurity]: The parsed response data. """ return self._parse_many( - ManagementNetworkSecurity, super()._make_request("GET", data=data, params=params).json() + ManagementNetworkSecurity, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementNetworkSecurity: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementNetworkSecurity: """ Performs a POST request against the /system/managementNetworkSecurities endpoint. @@ -79,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementNetworkSecurity: The parsed response data. """ return self._parse_one( - ManagementNetworkSecurity, super()._make_request("POST", data=data, params=params).json() + ManagementNetworkSecurity, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesIdEndpoint.py index ea4f0d3c3..f8ce0620b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemManagementnetworksecuritiesIdTestcredentialsEndpoint import \ - SystemManagementnetworksecuritiesIdTestcredentialsEndpoint +from pyconnectwise.endpoints.manage.SystemManagementnetworksecuritiesIdTestcredentialsEndpoint import ( + SystemManagementnetworksecuritiesIdTestcredentialsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagementNetworkSecurity from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.test_credentials = self._register_child_endpoint( - SystemManagementnetworksecuritiesIdTestcredentialsEndpoint(client, parent_endpoint=self) + SystemManagementnetworksecuritiesIdTestcredentialsEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementNetworkSecurity: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementNetworkSecurity: """ Performs a GET request against the /system/managementNetworkSecurities/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManagementNetworkSecurity: The parsed response data. """ - return self._parse_one(ManagementNetworkSecurity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ManagementNetworkSecurity, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/managementNetworkSecurities/{id} endpoint. @@ -61,9 +71,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementNetworkSecurity: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementNetworkSecurity: """ Performs a PUT request against the /system/managementNetworkSecurities/{id} endpoint. @@ -73,9 +88,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: ManagementNetworkSecurity: The parsed response data. """ - return self._parse_one(ManagementNetworkSecurity, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ManagementNetworkSecurity, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementNetworkSecurity: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ManagementNetworkSecurity: """ Performs a PATCH request against the /system/managementNetworkSecurities/{id} endpoint. @@ -86,5 +106,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ManagementNetworkSecurity: The parsed response data. """ return self._parse_one( - ManagementNetworkSecurity, super()._make_request("PATCH", data=data, params=params).json() + ManagementNetworkSecurity, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesIdTestCredentialsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesIdTestCredentialsEndpoint.py index 734b88a0f..d6922eec4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesIdTestCredentialsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemManagementNetworkSecuritiesIdTestCredentialsEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a GET request against the /system/managementNetworkSecurities/{id}/testCredentials endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportEndpoint.py index a91085c61..5237f27e0 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMarketplaceimportGetdefinitionEndpoint import \ - SystemMarketplaceimportGetdefinitionEndpoint -from pyconnectwise.endpoints.manage.SystemMarketplaceimportImportEndpoint import SystemMarketplaceimportImportEndpoint +from pyconnectwise.endpoints.manage.SystemMarketplaceimportGetdefinitionEndpoint import ( + SystemMarketplaceimportGetdefinitionEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMarketplaceimportImportEndpoint import ( + SystemMarketplaceimportImportEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportGetdefinitionEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportGetdefinitionEndpoint.py index 0a722e728..8cc36b218 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportGetdefinitionEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportGetdefinitionEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMarketplaceimportGetdefinitionIdEndpoint import \ - SystemMarketplaceimportGetdefinitionIdEndpoint +from pyconnectwise.endpoints.manage.SystemMarketplaceimportGetdefinitionIdEndpoint import ( + SystemMarketplaceimportGetdefinitionIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> SystemMarketplaceimportGetdefinitionIdEndpoint: Returns: SystemMarketplaceimportGetdefinitionIdEndpoint: The initialized SystemMarketplaceimportGetdefinitionIdEndpoint object. """ - child = SystemMarketplaceimportGetdefinitionIdEndpoint(self.client, parent_endpoint=self) + child = SystemMarketplaceimportGetdefinitionIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportGetdefinitionIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportGetdefinitionIdEndpoint.py index 9deeb671e..7aff7b1be 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportGetdefinitionIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportGetdefinitionIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketplaceImport: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketplaceImport: """ Performs a GET request against the /system/marketplaceimport/getdefinition/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MarketplaceImport: The parsed response data. """ - return self._parse_one(MarketplaceImport, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MarketplaceImport, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportImportEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportImportEndpoint.py index b77677e5a..aaf14834c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportImportEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMarketplaceimportImportEndpoint.py @@ -10,7 +10,9 @@ class SystemMarketplaceimportImportEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "import", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MarketplaceImport: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MarketplaceImport: """ Performs a POST request against the /system/marketplaceimport/import endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MarketplaceImport: The parsed response data. """ - return self._parse_one(MarketplaceImport, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MarketplaceImport, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersCountEndpoint.py index 84633ab4a..35205a950 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersEndpoint.py index 9ec1ab1b4..c5fd7b37b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersEndpoint.py @@ -1,10 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersCountEndpoint import SystemMembersCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdEndpoint import SystemMembersIdEndpoint -from pyconnectwise.endpoints.manage.SystemMembersTypesEndpoint import SystemMembersTypesEndpoint -from pyconnectwise.endpoints.manage.SystemMembersWithssoEndpoint import SystemMembersWithssoEndpoint +from pyconnectwise.endpoints.manage.SystemMembersCountEndpoint import ( + SystemMembersCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdEndpoint import ( + SystemMembersIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersTypesEndpoint import ( + SystemMembersTypesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersWithssoEndpoint import ( + SystemMembersWithssoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Member from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,9 +22,15 @@ class SystemMembersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "members", parent_endpoint=parent_endpoint) - self.types = self._register_child_endpoint(SystemMembersTypesEndpoint(client, parent_endpoint=self)) - self.with_sso = self._register_child_endpoint(SystemMembersWithssoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemMembersCountEndpoint(client, parent_endpoint=self)) + self.types = self._register_child_endpoint( + SystemMembersTypesEndpoint(client, parent_endpoint=self) + ) + self.with_sso = self._register_child_endpoint( + SystemMembersWithssoEndpoint(client, parent_endpoint=self) + ) + self.count = self._register_child_endpoint( + SystemMembersCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMembersIdEndpoint: """ @@ -31,7 +45,9 @@ def id(self, id: int) -> SystemMembersIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Member]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Member]: """ Performs a GET request against the /system/members endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +68,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Member]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Member]: """ Performs a GET request against the /system/members endpoint. @@ -62,9 +80,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Member]: The parsed response data. """ - return self._parse_many(Member, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Member, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Member: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Member: """ Performs a POST request against the /system/members endpoint. @@ -74,4 +96,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Member: The parsed response data. """ - return self._parse_one(Member, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Member, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsCountEndpoint.py index 12a2add87..613abe1e3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdAccrualsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/{id}/accruals/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/{id}/accruals/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsEndpoint.py index aaccb0e7c..fc9badf86 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdAccrualsCountEndpoint import SystemMembersIdAccrualsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdAccrualsIdEndpoint import SystemMembersIdAccrualsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdAccrualsCountEndpoint import ( + SystemMembersIdAccrualsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdAccrualsIdEndpoint import ( + SystemMembersIdAccrualsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberAccrual from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemMembersIdAccrualsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "accruals", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemMembersIdAccrualsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMembersIdAccrualsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMembersIdAccrualsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberAccrual]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberAccrual]: """ Performs a GET request against the /system/members/{id}/accruals endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberAccrual]: The parsed response data. """ - return self._parse_many(MemberAccrual, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberAccrual, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberAccrual: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberAccrual: """ Performs a POST request against the /system/members/{id}/accruals endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberAccrual: The parsed response data. """ - return self._parse_one(MemberAccrual, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberAccrual, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsIdEndpoint.py index 8f6c7b039..67cff3fb5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdAccrualsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberAccrual: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberAccrual: """ Performs a GET request against the /system/members/{id}/accruals/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberAccrual: The parsed response data. """ - return self._parse_one(MemberAccrual, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberAccrual, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/members/{id}/accruals/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberAccrual: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberAccrual: """ Performs a PUT request against the /system/members/{id}/accruals/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberAccrual: The parsed response data. """ - return self._parse_one(MemberAccrual, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberAccrual, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberAccrual: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberAccrual: """ Performs a PATCH request against the /system/members/{id}/accruals/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberAccrual: The parsed response data. """ - return self._parse_one(MemberAccrual, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberAccrual, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsCountEndpoint.py index e2aac8263..84630df0d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdCertificationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/{id}/certifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/{id}/certifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsEndpoint.py index f447f8e02..06227b683 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdCertificationsCountEndpoint import \ - SystemMembersIdCertificationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdCertificationsIdEndpoint import \ - SystemMembersIdCertificationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdCertificationsCountEndpoint import ( + SystemMembersIdCertificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdCertificationsIdEndpoint import ( + SystemMembersIdCertificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberCertification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> SystemMembersIdCertificationsIdEndpoint: Returns: SystemMembersIdCertificationsIdEndpoint: The initialized SystemMembersIdCertificationsIdEndpoint object. """ - child = SystemMembersIdCertificationsIdEndpoint(self.client, parent_endpoint=self) + child = SystemMembersIdCertificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberCertification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberCertification]: """ Performs a GET request against the /system/members/{id}/certifications endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberCertification]: The parsed response data. """ - return self._parse_many(MemberCertification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberCertification, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberCertification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberCertification: """ Performs a POST request against the /system/members/{id}/certifications endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberCertification: The parsed response data. """ - return self._parse_one(MemberCertification, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberCertification, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsIdEndpoint.py index 9200b8fe6..8abaae1ad 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdCertificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberCertification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberCertification: """ Performs a GET request against the /system/members/{id}/certifications/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberCertification: The parsed response data. """ - return self._parse_one(MemberCertification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberCertification, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/members/{id}/certifications/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberCertification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberCertification: """ Performs a PUT request against the /system/members/{id}/certifications/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberCertification: The parsed response data. """ - return self._parse_one(MemberCertification, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberCertification, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberCertification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberCertification: """ Performs a PATCH request against the /system/members/{id}/certifications/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberCertification: The parsed response data. """ - return self._parse_one(MemberCertification, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberCertification, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdDeactivateEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdDeactivateEndpoint.py index a657892c7..0beb43352 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdDeactivateEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdDeactivateEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdDeactivateEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "deactivate", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberDeactivation: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberDeactivation: """ Performs a POST request against the /system/members/{id}/deactivate endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberDeactivation: The parsed response data. """ - return self._parse_one(MemberDeactivation, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberDeactivation, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsCountEndpoint.py index 78b9e7664..15b6fea8e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdDelegationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/{id}/delegations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/{id}/delegations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsEndpoint.py index 5e51dbf1e..162e14199 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdDelegationsCountEndpoint import \ - SystemMembersIdDelegationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdDelegationsIdEndpoint import SystemMembersIdDelegationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdDelegationsCountEndpoint import ( + SystemMembersIdDelegationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdDelegationsIdEndpoint import ( + SystemMembersIdDelegationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberDelegation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberDelegation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberDelegation]: """ Performs a GET request against the /system/members/{id}/delegations endpoint. @@ -63,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberDelegation]: The parsed response data. """ - return self._parse_many(MemberDelegation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberDelegation, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberDelegation: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberDelegation: """ Performs a POST request against the /system/members/{id}/delegations endpoint. @@ -75,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberDelegation: The parsed response data. """ - return self._parse_one(MemberDelegation, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberDelegation, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsIdEndpoint.py index 6de82e8f6..a0a7101e7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdDelegationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberDelegation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberDelegation: """ Performs a GET request against the /system/members/{id}/delegations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberDelegation: The parsed response data. """ - return self._parse_one(MemberDelegation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberDelegation, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/members/{id}/delegations/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberDelegation: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberDelegation: """ Performs a PUT request against the /system/members/{id}/delegations/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberDelegation: The parsed response data. """ - return self._parse_one(MemberDelegation, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberDelegation, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberDelegation: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberDelegation: """ Performs a PATCH request against the /system/members/{id}/delegations/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberDelegation: The parsed response data. """ - return self._parse_one(MemberDelegation, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberDelegation, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdEndpoint.py index 008480495..f6ccd789f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdEndpoint.py @@ -1,26 +1,54 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdAccrualsEndpoint import SystemMembersIdAccrualsEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdCertificationsEndpoint import SystemMembersIdCertificationsEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdDeactivateEndpoint import SystemMembersIdDeactivateEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdDelegationsEndpoint import SystemMembersIdDelegationsEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdImageEndpoint import SystemMembersIdImageEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdLinkssouserEndpoint import SystemMembersIdLinkssouserEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdManageddeviceaccountsEndpoint import \ - SystemMembersIdManageddeviceaccountsEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdMycertificationsEndpoint import \ - SystemMembersIdMycertificationsEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdNotificationsettingsEndpoint import \ - SystemMembersIdNotificationsettingsEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdPersonasEndpoint import SystemMembersIdPersonasEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdSkillsEndpoint import SystemMembersIdSkillsEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdSubmitEndpoint import SystemMembersIdSubmitEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdTokensEndpoint import SystemMembersIdTokensEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdUnlinkssouserEndpoint import SystemMembersIdUnlinkssouserEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdUnusedtimesheetsEndpoint import \ - SystemMembersIdUnusedtimesheetsEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdUsagesEndpoint import SystemMembersIdUsagesEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdAccrualsEndpoint import ( + SystemMembersIdAccrualsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdCertificationsEndpoint import ( + SystemMembersIdCertificationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdDeactivateEndpoint import ( + SystemMembersIdDeactivateEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdDelegationsEndpoint import ( + SystemMembersIdDelegationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdImageEndpoint import ( + SystemMembersIdImageEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdLinkssouserEndpoint import ( + SystemMembersIdLinkssouserEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdManageddeviceaccountsEndpoint import ( + SystemMembersIdManageddeviceaccountsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdMycertificationsEndpoint import ( + SystemMembersIdMycertificationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdNotificationsettingsEndpoint import ( + SystemMembersIdNotificationsettingsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdPersonasEndpoint import ( + SystemMembersIdPersonasEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdSkillsEndpoint import ( + SystemMembersIdSkillsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdSubmitEndpoint import ( + SystemMembersIdSubmitEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdTokensEndpoint import ( + SystemMembersIdTokensEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdUnlinkssouserEndpoint import ( + SystemMembersIdUnlinkssouserEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdUnusedtimesheetsEndpoint import ( + SystemMembersIdUnusedtimesheetsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdUsagesEndpoint import ( + SystemMembersIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Member from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -30,40 +58,58 @@ class SystemMembersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.unused_time_sheets = self._register_child_endpoint( - SystemMembersIdUnusedtimesheetsEndpoint(client, parent_endpoint=self) - ) - self.skills = self._register_child_endpoint(SystemMembersIdSkillsEndpoint(client, parent_endpoint=self)) - self.notification_settings = self._register_child_endpoint( - SystemMembersIdNotificationsettingsEndpoint(client, parent_endpoint=self) - ) - self.submit = self._register_child_endpoint(SystemMembersIdSubmitEndpoint(client, parent_endpoint=self)) - self.unlink_sso_user = self._register_child_endpoint( - SystemMembersIdUnlinkssouserEndpoint(client, parent_endpoint=self) + self.certifications = self._register_child_endpoint( + SystemMembersIdCertificationsEndpoint(client, parent_endpoint=self) ) - self.personas = self._register_child_endpoint(SystemMembersIdPersonasEndpoint(client, parent_endpoint=self)) self.link_sso_user = self._register_child_endpoint( SystemMembersIdLinkssouserEndpoint(client, parent_endpoint=self) ) - self.image = self._register_child_endpoint(SystemMembersIdImageEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(SystemMembersIdUsagesEndpoint(client, parent_endpoint=self)) - self.certifications = self._register_child_endpoint( - SystemMembersIdCertificationsEndpoint(client, parent_endpoint=self) + self.accruals = self._register_child_endpoint( + SystemMembersIdAccrualsEndpoint(client, parent_endpoint=self) + ) + self.mycertifications = self._register_child_endpoint( + SystemMembersIdMycertificationsEndpoint(client, parent_endpoint=self) + ) + self.deactivate = self._register_child_endpoint( + SystemMembersIdDeactivateEndpoint(client, parent_endpoint=self) ) - self.tokens = self._register_child_endpoint(SystemMembersIdTokensEndpoint(client, parent_endpoint=self)) self.managed_device_accounts = self._register_child_endpoint( SystemMembersIdManageddeviceaccountsEndpoint(client, parent_endpoint=self) ) - self.mycertifications = self._register_child_endpoint( - SystemMembersIdMycertificationsEndpoint(client, parent_endpoint=self) + self.usages = self._register_child_endpoint( + SystemMembersIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.skills = self._register_child_endpoint( + SystemMembersIdSkillsEndpoint(client, parent_endpoint=self) ) - self.accruals = self._register_child_endpoint(SystemMembersIdAccrualsEndpoint(client, parent_endpoint=self)) self.delegations = self._register_child_endpoint( SystemMembersIdDelegationsEndpoint(client, parent_endpoint=self) ) - self.deactivate = self._register_child_endpoint(SystemMembersIdDeactivateEndpoint(client, parent_endpoint=self)) + self.submit = self._register_child_endpoint( + SystemMembersIdSubmitEndpoint(client, parent_endpoint=self) + ) + self.image = self._register_child_endpoint( + SystemMembersIdImageEndpoint(client, parent_endpoint=self) + ) + self.unused_time_sheets = self._register_child_endpoint( + SystemMembersIdUnusedtimesheetsEndpoint(client, parent_endpoint=self) + ) + self.tokens = self._register_child_endpoint( + SystemMembersIdTokensEndpoint(client, parent_endpoint=self) + ) + self.notification_settings = self._register_child_endpoint( + SystemMembersIdNotificationsettingsEndpoint(client, parent_endpoint=self) + ) + self.unlink_sso_user = self._register_child_endpoint( + SystemMembersIdUnlinkssouserEndpoint(client, parent_endpoint=self) + ) + self.personas = self._register_child_endpoint( + SystemMembersIdPersonasEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Member]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Member]: """ Performs a GET request against the /system/members/{id} endpoint and returns an initialized PaginatedResponse object. @@ -84,7 +130,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Member: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Member: """ Performs a GET request against the /system/members/{id} endpoint. @@ -94,4 +142,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: Member: The parsed response data. """ - return self._parse_one(Member, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Member, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdImageEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdImageEndpoint.py index d7a91b055..d8a4b5ceb 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdImageEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdImageEndpoint.py @@ -9,7 +9,9 @@ class SystemMembersIdImageEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "image", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a GET request against the /system/members/{id}/image endpoint. @@ -19,4 +21,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdLinkSsoUserEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdLinkSsoUserEndpoint.py index ea7bd730a..3cd4d08d2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdLinkSsoUserEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdLinkSsoUserEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdLinkssouserEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "linkSsoUser", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/members/{id}/linkSsoUser endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdManagedDeviceAccountsBulkEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdManagedDeviceAccountsBulkEndpoint.py index 3a28fa2cc..6f0c2b171 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdManagedDeviceAccountsBulkEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdManagedDeviceAccountsBulkEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdManageddeviceaccountsBulkEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "bulk", parent_endpoint=parent_endpoint) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BulkResult: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BulkResult: """ Performs a DELETE request against the /system/members/{id}/managedDeviceAccounts/bulk endpoint. @@ -20,9 +22,13 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: BulkResult: The parsed response data. """ - return self._parse_one(BulkResult, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + BulkResult, super()._make_request("DELETE", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> BulkResult: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> BulkResult: """ Performs a PUT request against the /system/members/{id}/managedDeviceAccounts/bulk endpoint. @@ -32,4 +38,6 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> B Returns: BulkResult: The parsed response data. """ - return self._parse_one(BulkResult, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + BulkResult, super()._make_request("PUT", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdManagedDeviceAccountsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdManagedDeviceAccountsEndpoint.py index c42ca054e..450234771 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdManagedDeviceAccountsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdManagedDeviceAccountsEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdManageddeviceaccountsBulkEndpoint import \ - SystemMembersIdManageddeviceaccountsBulkEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdManageddeviceaccountsBulkEndpoint import ( + SystemMembersIdManageddeviceaccountsBulkEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ManagedDeviceAccount from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,10 +11,14 @@ class SystemMembersIdManageddeviceaccountsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "managedDeviceAccounts", parent_endpoint=parent_endpoint) + super().__init__( + client, "managedDeviceAccounts", parent_endpoint=parent_endpoint + ) self.bulk = self._register_child_endpoint( - SystemMembersIdManageddeviceaccountsBulkEndpoint(client, parent_endpoint=self) + SystemMembersIdManageddeviceaccountsBulkEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +44,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ManagedDeviceAccount]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ManagedDeviceAccount]: """ Performs a GET request against the /system/members/{id}/managedDeviceAccounts endpoint. @@ -49,4 +56,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ManagedDeviceAccount]: The parsed response data. """ - return self._parse_many(ManagedDeviceAccount, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ManagedDeviceAccount, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsCountEndpoint.py index a37c37134..e7ed84410 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdMycertificationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/{id}/mycertifications/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/{id}/mycertifications/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsEndpoint.py index c01dbcf20..77f4dc03b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdMycertificationsCountEndpoint import \ - SystemMembersIdMycertificationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdMycertificationsIdEndpoint import \ - SystemMembersIdMycertificationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdMycertificationsCountEndpoint import ( + SystemMembersIdMycertificationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdMycertificationsIdEndpoint import ( + SystemMembersIdMycertificationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberCertification from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> SystemMembersIdMycertificationsIdEndpoint: Returns: SystemMembersIdMycertificationsIdEndpoint: The initialized SystemMembersIdMycertificationsIdEndpoint object. """ - child = SystemMembersIdMycertificationsIdEndpoint(self.client, parent_endpoint=self) + child = SystemMembersIdMycertificationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberCertification]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberCertification]: """ Performs a GET request against the /system/members/{id}/mycertifications endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberCertification]: The parsed response data. """ - return self._parse_many(MemberCertification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberCertification, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberCertification: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberCertification: """ Performs a POST request against the /system/members/{id}/mycertifications endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberCertification: The parsed response data. """ - return self._parse_one(MemberCertification, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberCertification, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsIdEndpoint.py index 57f49e8f3..cd5271317 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdMycertificationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberCertification: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberCertification: """ Performs a GET request against the /system/members/{id}/mycertifications/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberCertification: The parsed response data. """ - return self._parse_one(MemberCertification, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberCertification, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/members/{id}/mycertifications/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberCertification: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberCertification: """ Performs a PUT request against the /system/members/{id}/mycertifications/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberCertification: The parsed response data. """ - return self._parse_one(MemberCertification, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberCertification, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberCertification: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberCertification: """ Performs a PATCH request against the /system/members/{id}/mycertifications/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberCertification: The parsed response data. """ - return self._parse_one(MemberCertification, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberCertification, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsCountEndpoint.py index 90cd4d850..db9e2b2ed 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdNotificationsettingsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/{id}/notificationSettings/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/{id}/notificationSettings/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsEndpoint.py index 8dd96c7b9..432856582 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdNotificationsettingsCountEndpoint import \ - SystemMembersIdNotificationsettingsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdNotificationsettingsIdEndpoint import \ - SystemMembersIdNotificationsettingsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdNotificationsettingsCountEndpoint import ( + SystemMembersIdNotificationsettingsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdNotificationsettingsIdEndpoint import ( + SystemMembersIdNotificationsettingsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberNotificationSetting from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class SystemMembersIdNotificationsettingsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "notificationSettings", parent_endpoint=parent_endpoint) + super().__init__( + client, "notificationSettings", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - SystemMembersIdNotificationsettingsCountEndpoint(client, parent_endpoint=self) + SystemMembersIdNotificationsettingsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> SystemMembersIdNotificationsettingsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemMembersIdNotificationsettingsIdEndpoint: Returns: SystemMembersIdNotificationsettingsIdEndpoint: The initialized SystemMembersIdNotificationsettingsIdEndpoint object. """ - child = SystemMembersIdNotificationsettingsIdEndpoint(self.client, parent_endpoint=self) + child = SystemMembersIdNotificationsettingsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberNotificationSetting]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberNotificationSetting]: """ Performs a GET request against the /system/members/{id}/notificationSettings endpoint. @@ -65,10 +75,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[MemberNotificationSetting]: The parsed response data. """ return self._parse_many( - MemberNotificationSetting, super()._make_request("GET", data=data, params=params).json() + MemberNotificationSetting, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberNotificationSetting: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberNotificationSetting: """ Performs a POST request against the /system/members/{id}/notificationSettings endpoint. @@ -79,5 +92,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberNotificationSetting: The parsed response data. """ return self._parse_one( - MemberNotificationSetting, super()._make_request("POST", data=data, params=params).json() + MemberNotificationSetting, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsIdEndpoint.py index 52a657e61..11fb9dda6 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdNotificationSettingsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberNotificationSetting: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberNotificationSetting: """ Performs a GET request against the /system/members/{id}/notificationSettings/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberNotificationSetting: The parsed response data. """ - return self._parse_one(MemberNotificationSetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberNotificationSetting, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/members/{id}/notificationSettings/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberNotificationSetting: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberNotificationSetting: """ Performs a PUT request against the /system/members/{id}/notificationSettings/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberNotificationSetting: The parsed response data. """ - return self._parse_one(MemberNotificationSetting, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberNotificationSetting, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberNotificationSetting: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberNotificationSetting: """ Performs a PATCH request against the /system/members/{id}/notificationSettings/{id} endpoint. @@ -80,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberNotificationSetting: The parsed response data. """ return self._parse_one( - MemberNotificationSetting, super()._make_request("PATCH", data=data, params=params).json() + MemberNotificationSetting, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasCountEndpoint.py index 983f66c08..20d723d9b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdPersonasCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/{id}/personas/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/{id}/personas/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasEndpoint.py index 5bc093209..8a342514d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdPersonasCountEndpoint import SystemMembersIdPersonasCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdPersonasIdEndpoint import SystemMembersIdPersonasIdEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdPersonasCountEndpoint import ( + SystemMembersIdPersonasCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdPersonasIdEndpoint import ( + SystemMembersIdPersonasIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberPersona from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemMembersIdPersonasEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "personas", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemMembersIdPersonasCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMembersIdPersonasCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMembersIdPersonasIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberPersona]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberPersona]: """ Performs a GET request against the /system/members/{id}/personas endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberPersona]: The parsed response data. """ - return self._parse_many(MemberPersona, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberPersona, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberPersona: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberPersona: """ Performs a POST request against the /system/members/{id}/personas endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberPersona: The parsed response data. """ - return self._parse_one(MemberPersona, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberPersona, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasIdEndpoint.py index c12805da8..f262749b6 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdPersonasIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberPersona: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberPersona: """ Performs a GET request against the /system/members/{id}/personas/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberPersona: The parsed response data. """ - return self._parse_one(MemberPersona, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberPersona, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/members/{id}/personas/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberPersona: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberPersona: """ Performs a PUT request against the /system/members/{id}/personas/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberPersona: The parsed response data. """ - return self._parse_one(MemberPersona, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberPersona, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberPersona: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberPersona: """ Performs a PATCH request against the /system/members/{id}/personas/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberPersona: The parsed response data. """ - return self._parse_one(MemberPersona, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberPersona, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsCountEndpoint.py index 72e641f6a..f69893d0d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdSkillsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/{id}/skills/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/{id}/skills/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsEndpoint.py index 8530f71cb..98a46eb06 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdSkillsCountEndpoint import SystemMembersIdSkillsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdSkillsIdEndpoint import SystemMembersIdSkillsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdSkillsCountEndpoint import ( + SystemMembersIdSkillsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersIdSkillsIdEndpoint import ( + SystemMembersIdSkillsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberSkill from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemMembersIdSkillsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "skills", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemMembersIdSkillsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMembersIdSkillsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMembersIdSkillsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemMembersIdSkillsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MemberSkill]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MemberSkill]: """ Performs a GET request against the /system/members/{id}/skills endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberSkill]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberSkill]: """ Performs a GET request against the /system/members/{id}/skills endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberSkill]: The parsed response data. """ - return self._parse_many(MemberSkill, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberSkill, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberSkill: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberSkill: """ Performs a POST request against the /system/members/{id}/skills endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberSkill: The parsed response data. """ - return self._parse_one(MemberSkill, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberSkill, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsIdEndpoint.py index ab1b8fbac..4a6187fce 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdSkillsIdEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdSkillsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MemberSkill]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MemberSkill]: """ Performs a GET request against the /system/members/{id}/skills/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberSkill: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberSkill: """ Performs a GET request against the /system/members/{id}/skills/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberSkill: The parsed response data. """ - return self._parse_one(MemberSkill, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberSkill, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/members/{id}/skills/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberSkill: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberSkill: """ Performs a PUT request against the /system/members/{id}/skills/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberSkill: The parsed response data. """ - return self._parse_one(MemberSkill, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberSkill, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberSkill: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberSkill: """ Performs a PATCH request against the /system/members/{id}/skills/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberSkill: The parsed response data. """ - return self._parse_one(MemberSkill, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberSkill, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdSubmitEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdSubmitEndpoint.py index c7fa9bad8..b9b2c0882 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdSubmitEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdSubmitEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdSubmitEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "submit", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/members/{id}/submit endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdTokensEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdTokensEndpoint.py index 0efa851ba..ab1ece0e1 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdTokensEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdTokensEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdTokensEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tokens", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Token: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Token: """ Performs a POST request against the /system/members/{id}/tokens endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Token: The parsed response data. """ - return self._parse_one(Token, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Token, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdUnlinkSsoUserEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdUnlinkSsoUserEndpoint.py index 796f81d75..9c96e5608 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdUnlinkSsoUserEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdUnlinkSsoUserEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdUnlinkssouserEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "unlinkSsoUser", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/members/{id}/unlinkSsoUser endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdUnusedTimeSheetsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdUnusedTimeSheetsEndpoint.py index 5943548a5..7cfcbcde1 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdUnusedTimeSheetsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdUnusedTimeSheetsEndpoint.py @@ -9,7 +9,9 @@ class SystemMembersIdUnusedtimesheetsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "unusedTimeSheets", parent_endpoint=parent_endpoint) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/members/{id}/unusedTimeSheets endpoint. @@ -19,4 +21,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdUsagesEndpoint.py index 81fdb7b85..aa48b8612 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersIdUsagesListEndpoint import SystemMembersIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.SystemMembersIdUsagesListEndpoint import ( + SystemMembersIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemMembersIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(SystemMembersIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + SystemMembersIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /system/members/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /system/members/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersIdUsagesListEndpoint.py index 7a81930c4..e6d573321 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /system/members/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /system/members/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersTypesCountEndpoint.py index bb29f4390..feef6f7f2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersTypesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersTypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/types/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/types/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersTypesEndpoint.py index af6cab2ca..038ce28f8 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersTypesCountEndpoint import SystemMembersTypesCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembersTypesIdEndpoint import SystemMembersTypesIdEndpoint -from pyconnectwise.endpoints.manage.SystemMembersTypesInfoEndpoint import SystemMembersTypesInfoEndpoint +from pyconnectwise.endpoints.manage.SystemMembersTypesCountEndpoint import ( + SystemMembersTypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersTypesIdEndpoint import ( + SystemMembersTypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembersTypesInfoEndpoint import ( + SystemMembersTypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemMembersTypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "types", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemMembersTypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemMembersTypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMembersTypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemMembersTypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMembersTypesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> SystemMembersTypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MemberType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MemberType]: """ Performs a GET request against the /system/members/types endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberType]: """ Performs a GET request against the /system/members/types endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberType]: The parsed response data. """ - return self._parse_many(MemberType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberType: """ Performs a POST request against the /system/members/types endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberType: The parsed response data. """ - return self._parse_one(MemberType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersTypesIdEndpoint.py index 3d1cf4310..3548ead5a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersTypesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersTypesIdInfoEndpoint import SystemMembersTypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemMembersTypesIdInfoEndpoint import ( + SystemMembersTypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemMembersTypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemMembersTypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemMembersTypesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MemberType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MemberType]: """ Performs a GET request against the /system/members/types/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberType: """ Performs a GET request against the /system/members/types/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberType: The parsed response data. """ - return self._parse_one(MemberType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/members/types/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberType: """ Performs a PUT request against the /system/members/types/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberType: The parsed response data. """ - return self._parse_one(MemberType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberType: """ Performs a PATCH request against the /system/members/types/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberType: The parsed response data. """ - return self._parse_one(MemberType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersTypesIdInfoEndpoint.py index ce57f9a8b..3b5b23396 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberTypeInfo: """ Performs a GET request against the /system/members/types/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberTypeInfo: The parsed response data. """ - return self._parse_one(MemberTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersTypesInfoCountEndpoint.py index aebf1330f..5e04a535c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersTypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/members/types/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/members/types/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersTypesInfoEndpoint.py index 6a3510b19..af4dc501e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersTypesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembersTypesInfoCountEndpoint import SystemMembersTypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemMembersTypesInfoCountEndpoint import ( + SystemMembersTypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemMembersTypesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemMembersTypesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMembersTypesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberTypeInfo]: """ Performs a GET request against the /system/members/types/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberTypeInfo]: The parsed response data. """ - return self._parse_many(MemberTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembersWithSsoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembersWithSsoEndpoint.py index 94e53533b..206c1766d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembersWithSsoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembersWithSsoEndpoint.py @@ -10,7 +10,9 @@ class SystemMembersWithssoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "withSso", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Member]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Member]: """ Performs a GET request against the /system/members/withSso endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Member]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Member]: """ Performs a GET request against the /system/members/withSso endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Member]: The parsed response data. """ - return self._parse_many(Member, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Member, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembertemplatesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembertemplatesCountEndpoint.py index 4707250df..1238136f7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembertemplatesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembertemplatesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMembertemplatesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/membertemplates/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/membertemplates/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMembertemplatesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembertemplatesEndpoint.py index f26082528..3bcb84a92 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembertemplatesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembertemplatesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMembertemplatesCountEndpoint import SystemMembertemplatesCountEndpoint -from pyconnectwise.endpoints.manage.SystemMembertemplatesIdEndpoint import SystemMembertemplatesIdEndpoint +from pyconnectwise.endpoints.manage.SystemMembertemplatesCountEndpoint import ( + SystemMembertemplatesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMembertemplatesIdEndpoint import ( + SystemMembertemplatesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +15,9 @@ class SystemMembertemplatesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "membertemplates", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemMembertemplatesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMembertemplatesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMembertemplatesIdEndpoint: """ diff --git a/src/pyconnectwise/endpoints/manage/SystemMembertemplatesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMembertemplatesIdEndpoint.py index b6c2f8358..850d4f004 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMembertemplatesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMembertemplatesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberTemplate: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberTemplate: """ Performs a GET request against the /system/membertemplates/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberTemplate: The parsed response data. """ - return self._parse_one(MemberTemplate, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberTemplate, + super()._make_request("GET", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberTemplate: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberTemplate: """ Performs a PATCH request against the /system/membertemplates/{id} endpoint. @@ -55,4 +62,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberTemplate: The parsed response data. """ - return self._parse_one(MemberTemplate, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberTemplate, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsCountEndpoint.py index 315a62f3d..62df4007b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMenuentriesIdLocationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/menuEntries/{id}/locations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/menuEntries/{id}/locations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsEndpoint.py index 9fa6dc258..c327a2a04 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMenuentriesIdLocationsCountEndpoint import \ - SystemMenuentriesIdLocationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMenuentriesIdLocationsIdEndpoint import SystemMenuentriesIdLocationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMenuentriesIdLocationsCountEndpoint import ( + SystemMenuentriesIdLocationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMenuentriesIdLocationsIdEndpoint import ( + SystemMenuentriesIdLocationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MenuEntryLocation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> SystemMenuentriesIdLocationsIdEndpoint: Returns: SystemMenuentriesIdLocationsIdEndpoint: The initialized SystemMenuentriesIdLocationsIdEndpoint object. """ - child = SystemMenuentriesIdLocationsIdEndpoint(self.client, parent_endpoint=self) + child = SystemMenuentriesIdLocationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MenuEntryLocation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MenuEntryLocation]: """ Performs a GET request against the /system/menuEntries/{id}/locations endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MenuEntryLocation]: The parsed response data. """ - return self._parse_many(MenuEntryLocation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MenuEntryLocation, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MenuEntryLocation: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MenuEntryLocation: """ Performs a POST request against the /system/menuEntries/{id}/locations endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MenuEntryLocation: The parsed response data. """ - return self._parse_one(MenuEntryLocation, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MenuEntryLocation, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsIdEndpoint.py index 3ca79ab65..33faf8d71 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMenuEntriesIdLocationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MenuEntryLocation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MenuEntryLocation: """ Performs a GET request against the /system/menuEntries/{id}/locations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MenuEntryLocation: The parsed response data. """ - return self._parse_one(MenuEntryLocation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MenuEntryLocation, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/menuEntries/{id}/locations/{id} endpoint. @@ -55,4 +62,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMenuentriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMenuentriesCountEndpoint.py index b6803fd44..fd6fe032b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMenuentriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMenuentriesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMenuentriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/menuentries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/menuentries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMenuentriesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMenuentriesEndpoint.py index e70305b02..0cf199ee9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMenuentriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMenuentriesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMenuentriesIdEndpoint import SystemMenuentriesIdEndpoint +from pyconnectwise.endpoints.manage.SystemMenuentriesIdEndpoint import ( + SystemMenuentriesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemMenuentriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMenuentriesIdEndpoint.py index 715cac1e3..d02e934af 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMenuentriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMenuentriesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMenuentriesIdLocationsEndpoint import SystemMenuentriesIdLocationsEndpoint +from pyconnectwise.endpoints.manage.SystemMenuentriesIdLocationsEndpoint import ( + SystemMenuentriesIdLocationsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemMenuentriesIdImageEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMenuentriesIdImageEndpoint.py index b04666fac..686112d6b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMenuentriesIdImageEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMenuentriesIdImageEndpoint.py @@ -9,7 +9,9 @@ class SystemMenuentriesIdImageEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "image", parent_endpoint=parent_endpoint) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a GET request against the /system/menuentries/{id}/image endpoint. @@ -19,9 +21,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> G Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a POST request against the /system/menuentries/{id}/image endpoint. @@ -31,4 +38,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsCountEndpoint.py index f18b461f5..b43ae6bf0 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMyaccountIdDelegationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/myAccount/{id}/delegations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/myAccount/{id}/delegations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsEndpoint.py index abac700c8..e64818587 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMyaccountIdDelegationsCountEndpoint import \ - SystemMyaccountIdDelegationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMyaccountIdDelegationsIdEndpoint import SystemMyaccountIdDelegationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMyaccountIdDelegationsCountEndpoint import ( + SystemMyaccountIdDelegationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMyaccountIdDelegationsIdEndpoint import ( + SystemMyaccountIdDelegationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberDelegation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> SystemMyaccountIdDelegationsIdEndpoint: Returns: SystemMyaccountIdDelegationsIdEndpoint: The initialized SystemMyaccountIdDelegationsIdEndpoint object. """ - child = SystemMyaccountIdDelegationsIdEndpoint(self.client, parent_endpoint=self) + child = SystemMyaccountIdDelegationsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberDelegation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberDelegation]: """ Performs a GET request against the /system/myAccount/{id}/delegations endpoint. @@ -63,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberDelegation]: The parsed response data. """ - return self._parse_many(MemberDelegation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberDelegation, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberDelegation: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberDelegation: """ Performs a POST request against the /system/myAccount/{id}/delegations endpoint. @@ -75,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberDelegation: The parsed response data. """ - return self._parse_one(MemberDelegation, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberDelegation, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsIdEndpoint.py index 3bf26f0a8..4f8f17679 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdDelegationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberDelegation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberDelegation: """ Performs a GET request against the /system/myAccount/{id}/delegations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberDelegation: The parsed response data. """ - return self._parse_one(MemberDelegation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberDelegation, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/myAccount/{id}/delegations/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberDelegation: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberDelegation: """ Performs a PUT request against the /system/myAccount/{id}/delegations/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberDelegation: The parsed response data. """ - return self._parse_one(MemberDelegation, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberDelegation, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberDelegation: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberDelegation: """ Performs a PATCH request against the /system/myAccount/{id}/delegations/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberDelegation: The parsed response data. """ - return self._parse_one(MemberDelegation, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberDelegation, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdEndpoint.py index ab1d73685..001fc4cbe 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMyaccountIdDelegationsEndpoint import SystemMyaccountIdDelegationsEndpoint -from pyconnectwise.endpoints.manage.SystemMyaccountIdSkillsEndpoint import SystemMyaccountIdSkillsEndpoint +from pyconnectwise.endpoints.manage.SystemMyaccountIdDelegationsEndpoint import ( + SystemMyaccountIdDelegationsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMyaccountIdSkillsEndpoint import ( + SystemMyaccountIdSkillsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MyAccount from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,9 +19,13 @@ def __init__(self, client, parent_endpoint=None): self.delegations = self._register_child_endpoint( SystemMyaccountIdDelegationsEndpoint(client, parent_endpoint=self) ) - self.skills = self._register_child_endpoint(SystemMyaccountIdSkillsEndpoint(client, parent_endpoint=self)) + self.skills = self._register_child_endpoint( + SystemMyaccountIdSkillsEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MyAccount]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MyAccount]: """ Performs a GET request against the /system/myAccount/{id} endpoint and returns an initialized PaginatedResponse object. @@ -38,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MyAccount: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MyAccount: """ Performs a GET request against the /system/myAccount/{id} endpoint. @@ -48,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MyAccount: The parsed response data. """ - return self._parse_one(MyAccount, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MyAccount, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MyAccount: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MyAccount: """ Performs a PUT request against the /system/myAccount/{id} endpoint. @@ -60,9 +74,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MyAccount: The parsed response data. """ - return self._parse_one(MyAccount, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MyAccount, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MyAccount: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MyAccount: """ Performs a PATCH request against the /system/myAccount/{id} endpoint. @@ -72,4 +90,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MyAccount: The parsed response data. """ - return self._parse_one(MyAccount, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MyAccount, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsCountEndpoint.py index 95b444248..0fa769448 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMyaccountIdSkillsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/myAccount/{id}/skills/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/myAccount/{id}/skills/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsEndpoint.py index c257c6d66..c869c043e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMyaccountIdSkillsCountEndpoint import SystemMyaccountIdSkillsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMyaccountIdSkillsIdEndpoint import SystemMyaccountIdSkillsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMyaccountIdSkillsCountEndpoint import ( + SystemMyaccountIdSkillsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMyaccountIdSkillsIdEndpoint import ( + SystemMyaccountIdSkillsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MemberSkill from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemMyaccountIdSkillsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "skills", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemMyaccountIdSkillsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMyaccountIdSkillsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMyaccountIdSkillsIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemMyaccountIdSkillsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MemberSkill]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MemberSkill]: """ Performs a GET request against the /system/myAccount/{id}/skills endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MemberSkill]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MemberSkill]: """ Performs a GET request against the /system/myAccount/{id}/skills endpoint. @@ -58,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MemberSkill]: The parsed response data. """ - return self._parse_many(MemberSkill, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MemberSkill, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberSkill: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberSkill: """ Performs a POST request against the /system/myAccount/{id}/skills endpoint. @@ -70,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberSkill: The parsed response data. """ - return self._parse_one(MemberSkill, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + MemberSkill, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsIdEndpoint.py index adb829e58..e7a0f9ff8 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyAccountIdSkillsIdEndpoint.py @@ -10,7 +10,9 @@ class SystemMyaccountIdSkillsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MemberSkill]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MemberSkill]: """ Performs a GET request against the /system/myAccount/{id}/skills/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberSkill: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberSkill: """ Performs a GET request against the /system/myAccount/{id}/skills/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberSkill: The parsed response data. """ - return self._parse_one(MemberSkill, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MemberSkill, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/myAccount/{id}/skills/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberSkill: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberSkill: """ Performs a PUT request against the /system/myAccount/{id}/skills/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MemberSkill: The parsed response data. """ - return self._parse_one(MemberSkill, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + MemberSkill, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MemberSkill: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MemberSkill: """ Performs a PATCH request against the /system/myAccount/{id}/skills/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: MemberSkill: The parsed response data. """ - return self._parse_one(MemberSkill, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + MemberSkill, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureCountEndpoint.py index 11171a1b5..b7ff4fae4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyCorporatestructureCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/myCompany/corporateStructure/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/myCompany/corporateStructure/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureEndpoint.py index f84e1f358..2ff31847c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureCountEndpoint import \ - SystemMycompanyCorporatestructureCountEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureIdEndpoint import \ - SystemMycompanyCorporatestructureIdEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureInfoEndpoint import \ - SystemMycompanyCorporatestructureInfoEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureCountEndpoint import ( + SystemMycompanyCorporatestructureCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureIdEndpoint import ( + SystemMycompanyCorporatestructureIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureInfoEndpoint import ( + SystemMycompanyCorporatestructureInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CorporateStructure from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -16,12 +19,12 @@ class SystemMycompanyCorporatestructureEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "corporateStructure", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - SystemMycompanyCorporatestructureInfoEndpoint(client, parent_endpoint=self) - ) self.count = self._register_child_endpoint( SystemMycompanyCorporatestructureCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + SystemMycompanyCorporatestructureInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMycompanyCorporatestructureIdEndpoint: """ @@ -32,7 +35,9 @@ def id(self, id: int) -> SystemMycompanyCorporatestructureIdEndpoint: Returns: SystemMycompanyCorporatestructureIdEndpoint: The initialized SystemMycompanyCorporatestructureIdEndpoint object. """ - child = SystemMycompanyCorporatestructureIdEndpoint(self.client, parent_endpoint=self) + child = SystemMycompanyCorporatestructureIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -59,7 +64,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CorporateStructure]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CorporateStructure]: """ Performs a GET request against the /system/myCompany/corporateStructure endpoint. @@ -69,4 +76,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CorporateStructure]: The parsed response data. """ - return self._parse_many(CorporateStructure, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CorporateStructure, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureIdEndpoint.py index aef694b2a..852761e26 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureIdInfoEndpoint import \ - SystemMycompanyCorporatestructureIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureIdInfoEndpoint import ( + SystemMycompanyCorporatestructureIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CorporateStructure from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.info = self._register_child_endpoint( - SystemMycompanyCorporatestructureIdInfoEndpoint(client, parent_endpoint=self) + SystemMycompanyCorporatestructureIdInfoEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CorporateStructure: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CorporateStructure: """ Performs a GET request against the /system/myCompany/corporateStructure/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CorporateStructure: The parsed response data. """ - return self._parse_one(CorporateStructure, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CorporateStructure, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CorporateStructure: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CorporateStructure: """ Performs a PUT request against the /system/myCompany/corporateStructure/{id} endpoint. @@ -61,9 +71,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CorporateStructure: The parsed response data. """ - return self._parse_one(CorporateStructure, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + CorporateStructure, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CorporateStructure: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CorporateStructure: """ Performs a PATCH request against the /system/myCompany/corporateStructure/{id} endpoint. @@ -73,4 +88,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: CorporateStructure: The parsed response data. """ - return self._parse_one(CorporateStructure, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + CorporateStructure, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureIdInfoEndpoint.py index 1ccd5f45f..73ab7b40e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CorporateStructureInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CorporateStructureInfo: """ Performs a GET request against the /system/myCompany/corporateStructure/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CorporateStructureInfo: The parsed response data. """ - return self._parse_one(CorporateStructureInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CorporateStructureInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureInfoCountEndpoint.py index f83ee77f8..a3510ac0b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyCorporatestructureInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/myCompany/corporateStructure/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/myCompany/corporateStructure/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureInfoEndpoint.py index de0a1b7e7..7b675f68f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureInfoCountEndpoint import \ - SystemMycompanyCorporatestructureInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructureInfoCountEndpoint import ( + SystemMycompanyCorporatestructureInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CorporateStructureInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - SystemMycompanyCorporatestructureInfoCountEndpoint(client, parent_endpoint=self) + SystemMycompanyCorporatestructureInfoCountEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CorporateStructureInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CorporateStructureInfo]: """ Performs a GET request against the /system/myCompany/corporateStructure/info endpoint. @@ -49,4 +54,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CorporateStructureInfo]: The parsed response data. """ - return self._parse_many(CorporateStructureInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CorporateStructureInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsCountEndpoint.py index e2617f513..a7d4d74c3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyCorporatestructurelevelsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/myCompany/corporateStructureLevels/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/myCompany/corporateStructureLevels/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsEndpoint.py index 3b4c3d527..91526f021 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructurelevelsCountEndpoint import \ - SystemMycompanyCorporatestructurelevelsCountEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructurelevelsIdEndpoint import \ - SystemMycompanyCorporatestructurelevelsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructurelevelsCountEndpoint import ( + SystemMycompanyCorporatestructurelevelsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMycompanyCorporatestructurelevelsIdEndpoint import ( + SystemMycompanyCorporatestructurelevelsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CorporateStructureLevel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +14,14 @@ class SystemMycompanyCorporatestructurelevelsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "corporateStructureLevels", parent_endpoint=parent_endpoint) + super().__init__( + client, "corporateStructureLevels", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( - SystemMycompanyCorporatestructurelevelsCountEndpoint(client, parent_endpoint=self) + SystemMycompanyCorporatestructurelevelsCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> SystemMycompanyCorporatestructurelevelsIdEndpoint: @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemMycompanyCorporatestructurelevelsIdEndpoint: Returns: SystemMycompanyCorporatestructurelevelsIdEndpoint: The initialized SystemMycompanyCorporatestructurelevelsIdEndpoint object. """ - child = SystemMycompanyCorporatestructurelevelsIdEndpoint(self.client, parent_endpoint=self) + child = SystemMycompanyCorporatestructurelevelsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CorporateStructureLevel]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CorporateStructureLevel]: """ Performs a GET request against the /system/myCompany/corporateStructureLevels endpoint. @@ -64,4 +74,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CorporateStructureLevel]: The parsed response data. """ - return self._parse_many(CorporateStructureLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CorporateStructureLevel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsIdEndpoint.py index 2bda9b571..8964a42f1 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCorporateStructureLevelsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CorporateStructureLevel: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CorporateStructureLevel: """ Performs a GET request against the /system/myCompany/corporateStructureLevels/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CorporateStructureLevel: The parsed response data. """ - return self._parse_one(CorporateStructureLevel, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CorporateStructureLevel, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmCountEndpoint.py index 61eaef9c0..eaa532950 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyCrmCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/myCompany/crm/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/myCompany/crm/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmEndpoint.py index c942fcb4d..c013ecce5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCrmCountEndpoint import SystemMycompanyCrmCountEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCrmIdEndpoint import SystemMycompanyCrmIdEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCrmInfoEndpoint import SystemMycompanyCrmInfoEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyCrmCountEndpoint import ( + SystemMycompanyCrmCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMycompanyCrmIdEndpoint import ( + SystemMycompanyCrmIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMycompanyCrmInfoEndpoint import ( + SystemMycompanyCrmInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Crm from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemMycompanyCrmEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "crm", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemMycompanyCrmInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemMycompanyCrmCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMycompanyCrmCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemMycompanyCrmInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMycompanyCrmIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> SystemMycompanyCrmIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Crm]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Crm]: """ Performs a GET request against the /system/myCompany/crm endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Crm]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Crm]: """ Performs a GET request against the /system/myCompany/crm endpoint. @@ -60,4 +74,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Crm]: The parsed response data. """ - return self._parse_many(Crm, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Crm, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmIdEndpoint.py index 6ab9d7e20..fc079438a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCrmIdInfoEndpoint import SystemMycompanyCrmIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyCrmIdInfoEndpoint import ( + SystemMycompanyCrmIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Crm from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemMycompanyCrmIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemMycompanyCrmIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemMycompanyCrmIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Crm]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Crm]: """ Performs a GET request against the /system/myCompany/crm/{id} endpoint and returns an initialized PaginatedResponse object. @@ -44,7 +50,9 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Crm: The parsed response data. """ - return self._parse_one(Crm, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Crm, super()._make_request("GET", data=data, params=params).json() + ) def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Crm: """ @@ -56,9 +64,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Crm: The parsed response data. """ - return self._parse_one(Crm, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Crm, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Crm: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Crm: """ Performs a PATCH request against the /system/myCompany/crm/{id} endpoint. @@ -68,4 +80,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Crm: The parsed response data. """ - return self._parse_one(Crm, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Crm, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmIdInfoEndpoint.py index 495edf01b..f9f2ac4e1 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmIdInfoEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyCrmIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CrmInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CrmInfo]: """ Performs a GET request against the /system/myCompany/crm/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> CrmInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> CrmInfo: """ Performs a GET request against the /system/myCompany/crm/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: CrmInfo: The parsed response data. """ - return self._parse_one(CrmInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + CrmInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmInfoCountEndpoint.py index bb4675542..126dd9702 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyCrmInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/myCompany/crm/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/myCompany/crm/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmInfoEndpoint.py index 61e3c3666..1f4dbadc5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyCrmInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyCrmInfoCountEndpoint import SystemMycompanyCrmInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyCrmInfoCountEndpoint import ( + SystemMycompanyCrmInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import CrmInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemMycompanyCrmInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemMycompanyCrmInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMycompanyCrmInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[CrmInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[CrmInfo]: """ Performs a GET request against the /system/myCompany/crm/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[CrmInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[CrmInfo]: """ Performs a GET request against the /system/myCompany/crm/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[CrmInfo]: The parsed response data. """ - return self._parse_many(CrmInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + CrmInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherCountEndpoint.py index bd5df07e6..e021de16a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyOtherCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/myCompany/other/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/myCompany/other/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherEndpoint.py index e675fe3d7..0b6faf899 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyOtherCountEndpoint import SystemMycompanyOtherCountEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyOtherIdEndpoint import SystemMycompanyOtherIdEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyOtherCountEndpoint import ( + SystemMycompanyOtherCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMycompanyOtherIdEndpoint import ( + SystemMycompanyOtherIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Other from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemMycompanyOtherEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "other", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemMycompanyOtherCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemMycompanyOtherCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemMycompanyOtherIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemMycompanyOtherIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Other]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Other]: """ Performs a GET request against the /system/myCompany/other endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Other]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Other]: """ Performs a GET request against the /system/myCompany/other endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Other]: The parsed response data. """ - return self._parse_many(Other, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Other, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherIdEndpoint.py index c926269ea..8202eb341 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyOtherIdEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyOtherIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Other]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Other]: """ Performs a GET request against the /system/myCompany/other/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Other: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Other: """ Performs a GET request against the /system/myCompany/other/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: Other: The parsed response data. """ - return self._parse_one(Other, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Other, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Other: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Other: """ Performs a PUT request against the /system/myCompany/other/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: Other: The parsed response data. """ - return self._parse_one(Other, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Other, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Other: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Other: """ Performs a PATCH request against the /system/myCompany/other/{id} endpoint. @@ -65,4 +77,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Other: The parsed response data. """ - return self._parse_one(Other, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Other, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseCountEndpoint.py index 4490c60bd..94dfce7a8 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseCountEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyTimeexpenseCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/myCompany/timeExpense/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/myCompany/timeExpense/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseEndpoint.py index 4f8d8dc42..bb42c9809 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyTimeexpenseCountEndpoint import \ - SystemMycompanyTimeexpenseCountEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyTimeexpenseIdEndpoint import SystemMycompanyTimeexpenseIdEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyTimeexpenseCountEndpoint import ( + SystemMycompanyTimeexpenseCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemMycompanyTimeexpenseIdEndpoint import ( + SystemMycompanyTimeexpenseIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeExpense from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -30,7 +33,9 @@ def id(self, id: int) -> SystemMycompanyTimeexpenseIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimeExpense]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimeExpense]: """ Performs a GET request against the /system/myCompany/timeExpense endpoint and returns an initialized PaginatedResponse object. @@ -51,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeExpense]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeExpense]: """ Performs a GET request against the /system/myCompany/timeExpense endpoint. @@ -61,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeExpense]: The parsed response data. """ - return self._parse_many(TimeExpense, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeExpense, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseIdEndpoint.py index 2155f517e..4aac546b5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyCompanyTimeExpenseIdEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyTimeexpenseIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimeExpense]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimeExpense]: """ Performs a GET request against the /system/myCompany/timeExpense/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeExpense: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeExpense: """ Performs a GET request against the /system/myCompany/timeExpense/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeExpense: The parsed response data. """ - return self._parse_one(TimeExpense, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimeExpense, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeExpense: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeExpense: """ Performs a PUT request against the /system/myCompany/timeExpense/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeExpense: The parsed response data. """ - return self._parse_one(TimeExpense, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TimeExpense, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeExpense: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeExpense: """ Performs a PATCH request against the /system/myCompany/timeExpense/{id} endpoint. @@ -65,4 +77,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimeExpense: The parsed response data. """ - return self._parse_one(TimeExpense, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TimeExpense, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyMembersEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyMembersEndpoint.py index e60feb16e..37fd52d15 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyMembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyMembersEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMymembersInfoEndpoint import SystemMymembersInfoEndpoint +from pyconnectwise.endpoints.manage.SystemMymembersInfoEndpoint import ( + SystemMymembersInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MyMember from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemMymembersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "myMembers", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemMymembersInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemMymembersInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MyMember]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MyMember]: """ Performs a GET request against the /system/myMembers endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MyMember: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MyMember: """ Performs a GET request against the /system/myMembers endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MyMember: The parsed response data. """ - return self._parse_one(MyMember, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MyMember, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyMembersInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyMembersInfoEndpoint.py index 338606c4b..639d280df 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyMembersInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyMembersInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> MyMemberInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> MyMemberInfo: """ Performs a GET request against the /system/myMembers/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> M Returns: MyMemberInfo: The parsed response data. """ - return self._parse_one(MyMemberInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + MyMemberInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMySecurityEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMySecurityEndpoint.py index a728d7084..b3c801cda 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMySecurityEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMySecurityEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMysecurityCustomizeitemsEndpoint import SystemMysecurityCustomizeitemsEndpoint +from pyconnectwise.endpoints.manage.SystemMysecurityCustomizeitemsEndpoint import ( + SystemMysecurityCustomizeitemsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import MySecurity from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): SystemMysecurityCustomizeitemsEndpoint(client, parent_endpoint=self) ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[MySecurity]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[MySecurity]: """ Performs a GET request against the /system/mySecurity endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[MySecurity]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[MySecurity]: """ Performs a GET request against the /system/mySecurity endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[MySecurity]: The parsed response data. """ - return self._parse_many(MySecurity, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + MySecurity, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMyaccountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMyaccountEndpoint.py index 6b8069a5b..11c0a978f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMyaccountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMyaccountEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMyaccountIdEndpoint import SystemMyaccountIdEndpoint +from pyconnectwise.endpoints.manage.SystemMyaccountIdEndpoint import ( + SystemMyaccountIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyDocumentsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyDocumentsEndpoint.py index a2d0ce4a1..f6b0fe979 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyDocumentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyDocumentsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyDocumentsIdEndpoint import SystemMycompanyDocumentsIdEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyDocumentsIdEndpoint import ( + SystemMycompanyDocumentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import DocumentSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -47,7 +49,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[DocumentSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[DocumentSetup]: """ Performs a GET request against the /system/mycompany/documents endpoint. @@ -57,4 +61,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[DocumentSetup]: The parsed response data. """ - return self._parse_many(DocumentSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + DocumentSetup, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyDocumentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyDocumentsIdEndpoint.py index 7b59f982e..0c32ad626 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyDocumentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyDocumentsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DocumentSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DocumentSetup: """ Performs a GET request against the /system/mycompany/documents/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DocumentSetup: The parsed response data. """ - return self._parse_one(DocumentSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + DocumentSetup, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DocumentSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DocumentSetup: """ Performs a PUT request against the /system/mycompany/documents/{id} endpoint. @@ -55,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> D Returns: DocumentSetup: The parsed response data. """ - return self._parse_one(DocumentSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + DocumentSetup, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> DocumentSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> DocumentSetup: """ Performs a PATCH request against the /system/mycompany/documents/{id} endpoint. @@ -67,4 +77,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: DocumentSetup: The parsed response data. """ - return self._parse_one(DocumentSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + DocumentSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyEndpoint.py index 214a83308..bec014958 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyEndpoint.py @@ -14,9 +14,9 @@ class SystemMycompanyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "mycompany", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemMycompanyInfoEndpoint(client, parent_endpoint=self)) + self.documents = self._register_child_endpoint(SystemMycompanyDocumentsEndpoint(client, parent_endpoint=self)) self.reporting_services = self._register_child_endpoint( SystemMycompanyReportingservicesEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint(SystemMycompanyInfoEndpoint(client, parent_endpoint=self)) self.services = self._register_child_endpoint(SystemMycompanyServicesEndpoint(client, parent_endpoint=self)) - self.documents = self._register_child_endpoint(SystemMycompanyDocumentsEndpoint(client, parent_endpoint=self)) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoEndpoint.py index ecb0c9e65..5c5672fb4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyInfoServicesEndpoint import SystemMycompanyInfoServicesEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyInfoServicesEndpoint import ( + SystemMycompanyInfoServicesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,4 +12,6 @@ class SystemMycompanyInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.services = self._register_child_endpoint(SystemMycompanyInfoServicesEndpoint(client, parent_endpoint=self)) + self.services = self._register_child_endpoint( + SystemMycompanyInfoServicesEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoServicesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoServicesEndpoint.py index b4d9b3178..171617d9e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoServicesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoServicesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyInfoServicesIdEndpoint import SystemMycompanyInfoServicesIdEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyInfoServicesIdEndpoint import ( + SystemMycompanyInfoServicesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ServiceInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -24,7 +26,9 @@ def id(self, id: int) -> SystemMycompanyInfoServicesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ServiceInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ServiceInfo]: """ Performs a GET request against the /system/mycompany/info/services endpoint and returns an initialized PaginatedResponse object. @@ -45,7 +49,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ServiceInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ServiceInfo]: """ Performs a GET request against the /system/mycompany/info/services endpoint. @@ -55,4 +61,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ServiceInfo]: The parsed response data. """ - return self._parse_many(ServiceInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ServiceInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoServicesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoServicesIdEndpoint.py index f786c91ee..46271f06d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoServicesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyInfoServicesIdEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyInfoServicesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ServiceInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ServiceInfo]: """ Performs a GET request against the /system/mycompany/info/services/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ServiceInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ServiceInfo: """ Performs a GET request against the /system/mycompany/info/services/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ServiceInfo: The parsed response data. """ - return self._parse_one(ServiceInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ServiceInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesEndpoint.py index 360da5b9a..c3fcfa425 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyReportingservicesIdEndpoint import \ - SystemMycompanyReportingservicesIdEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyReportingservicesIdEndpoint import ( + SystemMycompanyReportingservicesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ReportingService from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,7 +22,9 @@ def id(self, id: int) -> SystemMycompanyReportingservicesIdEndpoint: Returns: SystemMycompanyReportingservicesIdEndpoint: The initialized SystemMycompanyReportingservicesIdEndpoint object. """ - child = SystemMycompanyReportingservicesIdEndpoint(self.client, parent_endpoint=self) + child = SystemMycompanyReportingservicesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -48,7 +51,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ReportingService]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ReportingService]: """ Performs a GET request against the /system/mycompany/reportingServices endpoint. @@ -58,4 +63,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ReportingService]: The parsed response data. """ - return self._parse_many(ReportingService, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ReportingService, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesIdEndpoint.py index 23ac0468c..dc8e588b9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyReportingservicesIdTestconnectionEndpoint import \ - SystemMycompanyReportingservicesIdTestconnectionEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyReportingservicesIdTestconnectionEndpoint import ( + SystemMycompanyReportingservicesIdTestconnectionEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ReportingService from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.test_connection = self._register_child_endpoint( - SystemMycompanyReportingservicesIdTestconnectionEndpoint(client, parent_endpoint=self) + SystemMycompanyReportingservicesIdTestconnectionEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportingService: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportingService: """ Performs a GET request against the /system/mycompany/reportingServices/{id} endpoint. @@ -49,9 +54,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: ReportingService: The parsed response data. """ - return self._parse_one(ReportingService, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ReportingService, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportingService: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportingService: """ Performs a PUT request against the /system/mycompany/reportingServices/{id} endpoint. @@ -61,9 +71,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: ReportingService: The parsed response data. """ - return self._parse_one(ReportingService, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ReportingService, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportingService: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportingService: """ Performs a PATCH request against the /system/mycompany/reportingServices/{id} endpoint. @@ -73,4 +88,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ReportingService: The parsed response data. """ - return self._parse_one(ReportingService, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ReportingService, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesIdTestConnectionEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesIdTestConnectionEndpoint.py index 64717404f..2d689c94d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesIdTestConnectionEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyReportingServicesIdTestConnectionEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyReportingservicesIdTestconnectionEndpoint(ConnectWiseEndpoi def __init__(self, client, parent_endpoint=None): super().__init__(client, "testConnection", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/mycompany/reportingServices/{id}/testConnection endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyServicesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyServicesEndpoint.py index 106a1bc74..29cb64184 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyServicesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyServicesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemMycompanyServicesIdEndpoint import SystemMycompanyServicesIdEndpoint +from pyconnectwise.endpoints.manage.SystemMycompanyServicesIdEndpoint import ( + SystemMycompanyServicesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Service from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -24,7 +26,9 @@ def id(self, id: int) -> SystemMycompanyServicesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Service]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Service]: """ Performs a GET request against the /system/mycompany/services endpoint and returns an initialized PaginatedResponse object. @@ -45,7 +49,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Service]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Service]: """ Performs a GET request against the /system/mycompany/services endpoint. @@ -55,4 +61,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Service]: The parsed response data. """ - return self._parse_many(Service, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Service, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemMycompanyServicesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemMycompanyServicesIdEndpoint.py index 8e9b5acbd..c3f473298 100644 --- a/src/pyconnectwise/endpoints/manage/SystemMycompanyServicesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemMycompanyServicesIdEndpoint.py @@ -10,7 +10,9 @@ class SystemMycompanyServicesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Service]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Service]: """ Performs a GET request against the /system/mycompany/services/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Service: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Service: """ Performs a GET request against the /system/mycompany/services/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Service: The parsed response data. """ - return self._parse_one(Service, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Service, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Service: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Service: """ Performs a PUT request against the /system/mycompany/services/{id} endpoint. @@ -53,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Service: The parsed response data. """ - return self._parse_one(Service, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Service, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Service: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Service: """ Performs a PATCH request against the /system/mycompany/services/{id} endpoint. @@ -65,4 +77,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Service: The parsed response data. """ - return self._parse_one(Service, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Service, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsCountEndpoint.py index c63a23a0c..9d7bea113 100644 --- a/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemNotificationrecipientsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/notificationRecipients/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/notificationRecipients/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsEndpoint.py index 3f98617e4..7fb6e1025 100644 --- a/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemNotificationrecipientsCountEndpoint import \ - SystemNotificationrecipientsCountEndpoint -from pyconnectwise.endpoints.manage.SystemNotificationrecipientsIdEndpoint import SystemNotificationrecipientsIdEndpoint +from pyconnectwise.endpoints.manage.SystemNotificationrecipientsCountEndpoint import ( + SystemNotificationrecipientsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemNotificationrecipientsIdEndpoint import ( + SystemNotificationrecipientsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import NotificationRecipient from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +14,9 @@ class SystemNotificationrecipientsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "notificationRecipients", parent_endpoint=parent_endpoint) + super().__init__( + client, "notificationRecipients", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( SystemNotificationrecipientsCountEndpoint(client, parent_endpoint=self) @@ -26,7 +31,9 @@ def id(self, id: int) -> SystemNotificationrecipientsIdEndpoint: Returns: SystemNotificationrecipientsIdEndpoint: The initialized SystemNotificationrecipientsIdEndpoint object. """ - child = SystemNotificationrecipientsIdEndpoint(self.client, parent_endpoint=self) + child = SystemNotificationrecipientsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +60,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[NotificationRecipient]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[NotificationRecipient]: """ Performs a GET request against the /system/notificationRecipients endpoint. @@ -63,4 +72,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[NotificationRecipient]: The parsed response data. """ - return self._parse_many(NotificationRecipient, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + NotificationRecipient, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsIdEndpoint.py index 460e0411d..32e94f85a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemNotificationRecipientsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> NotificationRecipient: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> NotificationRecipient: """ Performs a GET request against the /system/notificationRecipients/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> N Returns: NotificationRecipient: The parsed response data. """ - return self._parse_one(NotificationRecipient, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + NotificationRecipient, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsCountEndpoint.py index a97249348..387799f1d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemOffice365EmailsetupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/office365/emailSetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/office365/emailSetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsEndpoint.py index 17cf3d8b7..25ead675e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsCountEndpoint import \ - SystemOffice365EmailsetupsCountEndpoint -from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsIdEndpoint import SystemOffice365EmailsetupsIdEndpoint +from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsCountEndpoint import ( + SystemOffice365EmailsetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsIdEndpoint import ( + SystemOffice365EmailsetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Office365EmailSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Office365EmailSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Office365EmailSetup]: """ Performs a GET request against the /system/office365/emailSetups endpoint. @@ -63,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Office365EmailSetup]: The parsed response data. """ - return self._parse_many(Office365EmailSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Office365EmailSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Office365EmailSetup: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Office365EmailSetup: """ Performs a POST request against the /system/office365/emailSetups endpoint. @@ -75,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Office365EmailSetup: The parsed response data. """ - return self._parse_one(Office365EmailSetup, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Office365EmailSetup, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdAuthorizeEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdAuthorizeEndpoint.py index 96bcadfb5..0ade4554e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdAuthorizeEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdAuthorizeEndpoint.py @@ -10,7 +10,9 @@ class SystemOffice365EmailsetupsIdAuthorizeEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "authorize", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/office365/emailSetups/{id}/authorize endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdEndpoint.py index 86c2005d8..eea75b574 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsIdAuthorizeEndpoint import \ - SystemOffice365EmailsetupsIdAuthorizeEndpoint -from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsIdTestconnectionEndpoint import \ - SystemOffice365EmailsetupsIdTestconnectionEndpoint +from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsIdAuthorizeEndpoint import ( + SystemOffice365EmailsetupsIdAuthorizeEndpoint, +) +from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsIdTestconnectionEndpoint import ( + SystemOffice365EmailsetupsIdTestconnectionEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Office365EmailSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -18,7 +20,9 @@ def __init__(self, client, parent_endpoint=None): SystemOffice365EmailsetupsIdAuthorizeEndpoint(client, parent_endpoint=self) ) self.test_connection = self._register_child_endpoint( - SystemOffice365EmailsetupsIdTestconnectionEndpoint(client, parent_endpoint=self) + SystemOffice365EmailsetupsIdTestconnectionEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -44,7 +48,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Office365EmailSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Office365EmailSetup: """ Performs a GET request against the /system/office365/emailSetups/{id} endpoint. @@ -54,9 +60,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: Office365EmailSetup: The parsed response data. """ - return self._parse_one(Office365EmailSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Office365EmailSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/office365/emailSetups/{id} endpoint. @@ -66,9 +77,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Office365EmailSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Office365EmailSetup: """ Performs a PUT request against the /system/office365/emailSetups/{id} endpoint. @@ -78,9 +94,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: Office365EmailSetup: The parsed response data. """ - return self._parse_one(Office365EmailSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Office365EmailSetup, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Office365EmailSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Office365EmailSetup: """ Performs a PATCH request against the /system/office365/emailSetups/{id} endpoint. @@ -90,4 +111,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Office365EmailSetup: The parsed response data. """ - return self._parse_one(Office365EmailSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Office365EmailSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdTestConnectionEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdTestConnectionEndpoint.py index 9a04b54a6..e2f1843ee 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdTestConnectionEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOffice365EmailSetupsIdTestConnectionEndpoint.py @@ -10,7 +10,9 @@ class SystemOffice365EmailsetupsIdTestconnectionEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "testConnection", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /system/office365/emailSetups/{id}/testConnection endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOffice365Endpoint.py b/src/pyconnectwise/endpoints/manage/SystemOffice365Endpoint.py index f9a18d897..043f40303 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOffice365Endpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOffice365Endpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsEndpoint import SystemOffice365EmailsetupsEndpoint +from pyconnectwise.endpoints.manage.SystemOffice365EmailsetupsEndpoint import ( + SystemOffice365EmailsetupsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingCountEndpoint.py index 59cebd751..9b7abe64a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingCountEndpoint.py @@ -10,7 +10,9 @@ class SystemOnpremisesearchsettingCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/onPremiseSearchSetting/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/onPremiseSearchSetting/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingEndpoint.py index 24475bba7..b102bb4b5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingEndpoint.py @@ -1,16 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemOnpremisesearchsettingCountEndpoint import \ - SystemOnpremisesearchsettingCountEndpoint -from pyconnectwise.endpoints.manage.SystemOnpremisesearchsettingIdEndpoint import SystemOnpremisesearchsettingIdEndpoint +from pyconnectwise.endpoints.manage.SystemOnpremisesearchsettingCountEndpoint import ( + SystemOnpremisesearchsettingCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemOnpremisesearchsettingIdEndpoint import ( + SystemOnpremisesearchsettingIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse class SystemOnpremisesearchsettingEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "onPremiseSearchSetting", parent_endpoint=parent_endpoint) + super().__init__( + client, "onPremiseSearchSetting", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( SystemOnpremisesearchsettingCountEndpoint(client, parent_endpoint=self) @@ -25,6 +30,8 @@ def id(self, id: int) -> SystemOnpremisesearchsettingIdEndpoint: Returns: SystemOnpremisesearchsettingIdEndpoint: The initialized SystemOnpremisesearchsettingIdEndpoint object. """ - child = SystemOnpremisesearchsettingIdEndpoint(self.client, parent_endpoint=self) + child = SystemOnpremisesearchsettingIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingIdEndpoint.py index cc2073a38..901a67068 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOnpremisesearchsettingIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OnPremiseSearchSetting: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OnPremiseSearchSetting: """ Performs a GET request against the /system/onPremiseSearchSetting/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OnPremiseSearchSetting: The parsed response data. """ - return self._parse_one(OnPremiseSearchSetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OnPremiseSearchSetting, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OnPremiseSearchSetting: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OnPremiseSearchSetting: """ Performs a PUT request against the /system/onPremiseSearchSetting/{id} endpoint. @@ -55,9 +62,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OnPremiseSearchSetting: The parsed response data. """ - return self._parse_one(OnPremiseSearchSetting, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OnPremiseSearchSetting, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OnPremiseSearchSetting: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OnPremiseSearchSetting: """ Performs a PATCH request against the /system/onPremiseSearchSetting/{id} endpoint. @@ -67,4 +79,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OnPremiseSearchSetting: The parsed response data. """ - return self._parse_one(OnPremiseSearchSetting, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OnPremiseSearchSetting, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsCountEndpoint.py index d9045f017..398ca075b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemOsgradeweightsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/osgradeweights/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/osgradeweights/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsEndpoint.py index 76d40579a..7e3d5f9c5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemOsgradeweightsCountEndpoint import SystemOsgradeweightsCountEndpoint -from pyconnectwise.endpoints.manage.SystemOsgradeweightsIdEndpoint import SystemOsgradeweightsIdEndpoint +from pyconnectwise.endpoints.manage.SystemOsgradeweightsCountEndpoint import ( + SystemOsgradeweightsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemOsgradeweightsIdEndpoint import ( + SystemOsgradeweightsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import OsGradeWeight from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemOsgradeweightsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "osgradeweights", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemOsgradeweightsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemOsgradeweightsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemOsgradeweightsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[OsGradeWeight]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[OsGradeWeight]: """ Performs a GET request against the /system/osgradeweights endpoint. @@ -60,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[OsGradeWeight]: The parsed response data. """ - return self._parse_many(OsGradeWeight, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + OsGradeWeight, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsIdEndpoint.py index df889ed79..1f0304397 100644 --- a/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemOsgradeweightsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OsGradeWeight: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OsGradeWeight: """ Performs a GET request against the /system/osgradeweights/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OsGradeWeight: The parsed response data. """ - return self._parse_one(OsGradeWeight, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + OsGradeWeight, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OsGradeWeight: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OsGradeWeight: """ Performs a PUT request against the /system/osgradeweights/{id} endpoint. @@ -55,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> O Returns: OsGradeWeight: The parsed response data. """ - return self._parse_one(OsGradeWeight, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + OsGradeWeight, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> OsGradeWeight: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> OsGradeWeight: """ Performs a PATCH request against the /system/osgradeweights/{id} endpoint. @@ -67,4 +77,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: OsGradeWeight: The parsed response data. """ - return self._parse_one(OsGradeWeight, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + OsGradeWeight, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemParsingTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemParsingTypesCountEndpoint.py index 75db5edde..fed749c04 100644 --- a/src/pyconnectwise/endpoints/manage/SystemParsingTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemParsingTypesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemParsingtypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/parsingTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/parsingTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemParsingTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemParsingTypesEndpoint.py index 35ea4cf43..d224ff154 100644 --- a/src/pyconnectwise/endpoints/manage/SystemParsingTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemParsingTypesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemParsingtypesCountEndpoint import SystemParsingtypesCountEndpoint -from pyconnectwise.endpoints.manage.SystemParsingtypesIdEndpoint import SystemParsingtypesIdEndpoint +from pyconnectwise.endpoints.manage.SystemParsingtypesCountEndpoint import ( + SystemParsingtypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemParsingtypesIdEndpoint import ( + SystemParsingtypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ParsingType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemParsingtypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "parsingTypes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemParsingtypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemParsingtypesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemParsingtypesIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemParsingtypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ParsingType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ParsingType]: """ Performs a GET request against the /system/parsingTypes endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ParsingType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ParsingType]: """ Performs a GET request against the /system/parsingTypes endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ParsingType]: The parsed response data. """ - return self._parse_many(ParsingType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ParsingType, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemParsingTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemParsingTypesIdEndpoint.py index 21213fb38..c65a37daf 100644 --- a/src/pyconnectwise/endpoints/manage/SystemParsingTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemParsingTypesIdEndpoint.py @@ -10,7 +10,9 @@ class SystemParsingtypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ParsingType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ParsingType]: """ Performs a GET request against the /system/parsingTypes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ParsingType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ParsingType: """ Performs a GET request against the /system/parsingTypes/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ParsingType: The parsed response data. """ - return self._parse_one(ParsingType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ParsingType, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemParsingVariablesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemParsingVariablesCountEndpoint.py index 8b716c17f..b9e5acbbd 100644 --- a/src/pyconnectwise/endpoints/manage/SystemParsingVariablesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemParsingVariablesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemParsingvariablesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/parsingVariables/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/parsingVariables/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemParsingVariablesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemParsingVariablesEndpoint.py index ea9b248d9..2ec5cbef7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemParsingVariablesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemParsingVariablesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemParsingvariablesCountEndpoint import SystemParsingvariablesCountEndpoint -from pyconnectwise.endpoints.manage.SystemParsingvariablesIdEndpoint import SystemParsingvariablesIdEndpoint +from pyconnectwise.endpoints.manage.SystemParsingvariablesCountEndpoint import ( + SystemParsingvariablesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemParsingvariablesIdEndpoint import ( + SystemParsingvariablesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ParsingVariable from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemParsingvariablesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "parsingVariables", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemParsingvariablesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemParsingvariablesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemParsingvariablesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ParsingVariable]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ParsingVariable]: """ Performs a GET request against the /system/parsingVariables endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ParsingVariable]: The parsed response data. """ - return self._parse_many(ParsingVariable, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ParsingVariable, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemParsingVariablesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemParsingVariablesIdEndpoint.py index ef207b366..37a3428f3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemParsingVariablesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemParsingVariablesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ParsingVariable: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ParsingVariable: """ Performs a GET request against the /system/parsingVariables/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: ParsingVariable: The parsed response data. """ - return self._parse_one(ParsingVariable, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ParsingVariable, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemPortalReportsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemPortalReportsCountEndpoint.py index 208ae0a2c..2070653ed 100644 --- a/src/pyconnectwise/endpoints/manage/SystemPortalReportsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemPortalReportsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemPortalreportsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/portalReports/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/portalReports/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemPortalReportsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemPortalReportsEndpoint.py index d0bbf09e3..7c7868121 100644 --- a/src/pyconnectwise/endpoints/manage/SystemPortalReportsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemPortalReportsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemPortalreportsCountEndpoint import SystemPortalreportsCountEndpoint -from pyconnectwise.endpoints.manage.SystemPortalreportsIdEndpoint import SystemPortalreportsIdEndpoint +from pyconnectwise.endpoints.manage.SystemPortalreportsCountEndpoint import ( + SystemPortalreportsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemPortalreportsIdEndpoint import ( + SystemPortalreportsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import PortalReport from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemPortalreportsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "portalReports", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemPortalreportsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemPortalreportsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemPortalreportsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[PortalReport]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[PortalReport]: """ Performs a GET request against the /system/portalReports endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[PortalReport]: The parsed response data. """ - return self._parse_many(PortalReport, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + PortalReport, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalReport: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalReport: """ Performs a POST request against the /system/portalReports endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PortalReport: The parsed response data. """ - return self._parse_one(PortalReport, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + PortalReport, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemPortalReportsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemPortalReportsIdEndpoint.py index bb58cd0d0..ac2265d65 100644 --- a/src/pyconnectwise/endpoints/manage/SystemPortalReportsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemPortalReportsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalReport: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalReport: """ Performs a GET request against the /system/portalReports/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalReport: The parsed response data. """ - return self._parse_one(PortalReport, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + PortalReport, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/portalReports/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalReport: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalReport: """ Performs a PUT request against the /system/portalReports/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> P Returns: PortalReport: The parsed response data. """ - return self._parse_one(PortalReport, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + PortalReport, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> PortalReport: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> PortalReport: """ Performs a PATCH request against the /system/portalReports/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: PortalReport: The parsed response data. """ - return self._parse_one(PortalReport, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + PortalReport, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupCountEndpoint.py index 9163f1c4c..3c0a30772 100644 --- a/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupCountEndpoint.py @@ -10,7 +10,9 @@ class SystemQuotelinksetupCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/quoteLinkSetup/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/quoteLinkSetup/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupEndpoint.py index 203bd2341..b8858df2b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupEndpoint.py @@ -1,10 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemQuotelinksetupCountEndpoint import SystemQuotelinksetupCountEndpoint -from pyconnectwise.endpoints.manage.SystemQuotelinksetupIdEndpoint import SystemQuotelinksetupIdEndpoint -from pyconnectwise.endpoints.manage.SystemQuotelinksetupTestconnectionEndpoint import \ - SystemQuotelinksetupTestconnectionEndpoint +from pyconnectwise.endpoints.manage.SystemQuotelinksetupCountEndpoint import ( + SystemQuotelinksetupCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemQuotelinksetupIdEndpoint import ( + SystemQuotelinksetupIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemQuotelinksetupTestconnectionEndpoint import ( + SystemQuotelinksetupTestconnectionEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import QuoteLink from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,7 +19,9 @@ class SystemQuotelinksetupEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "quoteLinkSetup", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemQuotelinksetupCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemQuotelinksetupCountEndpoint(client, parent_endpoint=self) + ) self.test_connection = self._register_child_endpoint( SystemQuotelinksetupTestconnectionEndpoint(client, parent_endpoint=self) ) @@ -32,7 +39,9 @@ def id(self, id: int) -> SystemQuotelinksetupIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[QuoteLink]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[QuoteLink]: """ Performs a GET request against the /system/quoteLinkSetup endpoint and returns an initialized PaginatedResponse object. @@ -53,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[QuoteLink]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[QuoteLink]: """ Performs a GET request against the /system/quoteLinkSetup endpoint. @@ -63,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[QuoteLink]: The parsed response data. """ - return self._parse_many(QuoteLink, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + QuoteLink, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> QuoteLink: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> QuoteLink: """ Performs a POST request against the /system/quoteLinkSetup endpoint. @@ -75,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: QuoteLink: The parsed response data. """ - return self._parse_one(QuoteLink, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + QuoteLink, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupIdEndpoint.py index aca8f3004..ad0fd9f9d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupIdEndpoint.py @@ -10,7 +10,9 @@ class SystemQuotelinksetupIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[QuoteLink]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[QuoteLink]: """ Performs a GET request against the /system/quoteLinkSetup/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> QuoteLink: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> QuoteLink: """ Performs a GET request against the /system/quoteLinkSetup/{id} endpoint. @@ -41,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Q Returns: QuoteLink: The parsed response data. """ - return self._parse_one(QuoteLink, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + QuoteLink, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/quoteLinkSetup/{id} endpoint. @@ -53,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> QuoteLink: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> QuoteLink: """ Performs a PUT request against the /system/quoteLinkSetup/{id} endpoint. @@ -65,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Q Returns: QuoteLink: The parsed response data. """ - return self._parse_one(QuoteLink, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + QuoteLink, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> QuoteLink: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> QuoteLink: """ Performs a PATCH request against the /system/quoteLinkSetup/{id} endpoint. @@ -77,4 +94,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: QuoteLink: The parsed response data. """ - return self._parse_one(QuoteLink, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + QuoteLink, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupTestConnectionEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupTestConnectionEndpoint.py index e36d2d08e..9c53c8f45 100644 --- a/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupTestConnectionEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemQuoteLinkSetupTestConnectionEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a GET request against the /system/quoteLinkSetup/testConnection endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportCardsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportCardsCountEndpoint.py index 96a75c6f7..bc5ed9b40 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportCardsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportCardsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemReportcardsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/reportCards/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/reportCards/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportCardsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportCardsEndpoint.py index 406665426..6e5a288a9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportCardsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportCardsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemReportcardsCountEndpoint import SystemReportcardsCountEndpoint -from pyconnectwise.endpoints.manage.SystemReportcardsIdEndpoint import SystemReportcardsIdEndpoint -from pyconnectwise.endpoints.manage.SystemReportcardsInfoEndpoint import SystemReportcardsInfoEndpoint +from pyconnectwise.endpoints.manage.SystemReportcardsCountEndpoint import ( + SystemReportcardsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemReportcardsIdEndpoint import ( + SystemReportcardsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemReportcardsInfoEndpoint import ( + SystemReportcardsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ReportCard from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemReportcardsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "reportCards", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemReportcardsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemReportcardsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemReportcardsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemReportcardsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemReportcardsIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> SystemReportcardsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ReportCard]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ReportCard]: """ Performs a GET request against the /system/reportCards endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ReportCard]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ReportCard]: """ Performs a GET request against the /system/reportCards endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ReportCard]: The parsed response data. """ - return self._parse_many(ReportCard, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ReportCard, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportCard: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportCard: """ Performs a POST request against the /system/reportCards endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ReportCard: The parsed response data. """ - return self._parse_one(ReportCard, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ReportCard, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsCountEndpoint.py index 1f1cfc0dd..f758e6529 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemReportcardsIdDetailsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/reportCards/{id}/details/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/reportCards/{id}/details/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsEndpoint.py index 2ee74e4d5..801a21364 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemReportcardsIdDetailsCountEndpoint import \ - SystemReportcardsIdDetailsCountEndpoint -from pyconnectwise.endpoints.manage.SystemReportcardsIdDetailsIdEndpoint import SystemReportcardsIdDetailsIdEndpoint +from pyconnectwise.endpoints.manage.SystemReportcardsIdDetailsCountEndpoint import ( + SystemReportcardsIdDetailsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemReportcardsIdDetailsIdEndpoint import ( + SystemReportcardsIdDetailsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ReportCardDetail from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -53,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ReportCardDetail]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ReportCardDetail]: """ Performs a GET request against the /system/reportCards/{id}/details endpoint. @@ -63,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ReportCardDetail]: The parsed response data. """ - return self._parse_many(ReportCardDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ReportCardDetail, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportCardDetail: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportCardDetail: """ Performs a POST request against the /system/reportCards/{id}/details endpoint. @@ -75,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ReportCardDetail: The parsed response data. """ - return self._parse_one(ReportCardDetail, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ReportCardDetail, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsIdEndpoint.py index 80df0d8f2..ae20d3d88 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdDetailsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportCardDetail: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportCardDetail: """ Performs a GET request against the /system/reportCards/{id}/details/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: ReportCardDetail: The parsed response data. """ - return self._parse_one(ReportCardDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ReportCardDetail, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/reportCards/{id}/details/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportCardDetail: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportCardDetail: """ Performs a PUT request against the /system/reportCards/{id}/details/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: ReportCardDetail: The parsed response data. """ - return self._parse_one(ReportCardDetail, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ReportCardDetail, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportCardDetail: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportCardDetail: """ Performs a PATCH request against the /system/reportCards/{id}/details/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ReportCardDetail: The parsed response data. """ - return self._parse_one(ReportCardDetail, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ReportCardDetail, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdEndpoint.py index f1d25644d..a6860f25d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemReportcardsIdDetailsEndpoint import SystemReportcardsIdDetailsEndpoint -from pyconnectwise.endpoints.manage.SystemReportcardsIdInfoEndpoint import SystemReportcardsIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemReportcardsIdDetailsEndpoint import ( + SystemReportcardsIdDetailsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemReportcardsIdInfoEndpoint import ( + SystemReportcardsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ReportCard from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class SystemReportcardsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemReportcardsIdInfoEndpoint(client, parent_endpoint=self)) - self.details = self._register_child_endpoint(SystemReportcardsIdDetailsEndpoint(client, parent_endpoint=self)) + self.details = self._register_child_endpoint( + SystemReportcardsIdDetailsEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemReportcardsIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ReportCard]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ReportCard]: """ Performs a GET request against the /system/reportCards/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportCard: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportCard: """ Performs a GET request against the /system/reportCards/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: ReportCard: The parsed response data. """ - return self._parse_one(ReportCard, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ReportCard, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/reportCards/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportCard: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportCard: """ Performs a PUT request against the /system/reportCards/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: ReportCard: The parsed response data. """ - return self._parse_one(ReportCard, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ReportCard, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportCard: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportCard: """ Performs a PATCH request against the /system/reportCards/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ReportCard: The parsed response data. """ - return self._parse_one(ReportCard, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ReportCard, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdInfoEndpoint.py index 802a2c7d3..25a7b8365 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportCardsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportCardsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportCardInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportCardInfo: """ Performs a GET request against the /system/reportCards/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: ReportCardInfo: The parsed response data. """ - return self._parse_one(ReportCardInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ReportCardInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportCardsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportCardsInfoCountEndpoint.py index 9c516d6af..d5ba461f3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportCardsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportCardsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemReportcardsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/reportCards/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/reportCards/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportCardsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportCardsInfoEndpoint.py index 05ca70f26..8091b8031 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportCardsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportCardsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemReportcardsInfoCountEndpoint import SystemReportcardsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemReportcardsInfoCountEndpoint import ( + SystemReportcardsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ReportCardInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemReportcardsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemReportcardsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemReportcardsInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ReportCardInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ReportCardInfo]: """ Performs a GET request against the /system/reportCards/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ReportCardInfo]: The parsed response data. """ - return self._parse_many(ReportCardInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ReportCardInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportsEndpoint.py index dcba1aa3a..d8a063518 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemReportsIdEndpoint import SystemReportsIdEndpoint +from pyconnectwise.endpoints.manage.SystemReportsIdEndpoint import ( + SystemReportsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Report from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -24,7 +26,9 @@ def id(self, id: int) -> SystemReportsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Report]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Report]: """ Performs a GET request against the /system/reports endpoint and returns an initialized PaginatedResponse object. @@ -45,7 +49,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Report]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Report]: """ Performs a GET request against the /system/reports endpoint. @@ -55,4 +61,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Report]: The parsed response data. """ - return self._parse_many(Report, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Report, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportsIdCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportsIdCountEndpoint.py index 9d3393400..0bcfcb7c3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportsIdCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportsIdCountEndpoint.py @@ -10,7 +10,9 @@ class SystemReportsIdCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/reports/{id}/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/reports/{id}/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemReportsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemReportsIdEndpoint.py index 3ad26c5b1..9375f237f 100644 --- a/src/pyconnectwise/endpoints/manage/SystemReportsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemReportsIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemReportsIdColumnsEndpoint import SystemReportsIdColumnsEndpoint -from pyconnectwise.endpoints.manage.SystemReportsIdCountEndpoint import SystemReportsIdCountEndpoint +from pyconnectwise.endpoints.manage.SystemReportsIdColumnsEndpoint import ( + SystemReportsIdColumnsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemReportsIdCountEndpoint import ( + SystemReportsIdCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ReportDataResponse from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,8 +16,12 @@ class SystemReportsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.columns = self._register_child_endpoint(SystemReportsIdColumnsEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemReportsIdCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemReportsIdCountEndpoint(client, parent_endpoint=self) + ) + self.columns = self._register_child_endpoint( + SystemReportsIdColumnsEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -38,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ReportDataResponse: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ReportDataResponse: """ Performs a GET request against the /system/reports/{id} endpoint. @@ -48,4 +58,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> R Returns: ReportDataResponse: The parsed response data. """ - return self._parse_one(ReportDataResponse, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ReportDataResponse, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsCountEndpoint.py index bab6c7173..dcf2bbb9a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSecurityrolesIdSettingsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/securityRoles/{id}/settings/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/securityRoles/{id}/settings/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsEndpoint.py index 05289e6fd..5f6391d82 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSecurityrolesIdSettingsCountEndpoint import \ - SystemSecurityrolesIdSettingsCountEndpoint -from pyconnectwise.endpoints.manage.SystemSecurityrolesIdSettingsIdEndpoint import \ - SystemSecurityrolesIdSettingsIdEndpoint +from pyconnectwise.endpoints.manage.SystemSecurityrolesIdSettingsCountEndpoint import ( + SystemSecurityrolesIdSettingsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSecurityrolesIdSettingsIdEndpoint import ( + SystemSecurityrolesIdSettingsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SecurityRoleSetting from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> SystemSecurityrolesIdSettingsIdEndpoint: Returns: SystemSecurityrolesIdSettingsIdEndpoint: The initialized SystemSecurityrolesIdSettingsIdEndpoint object. """ - child = SystemSecurityrolesIdSettingsIdEndpoint(self.client, parent_endpoint=self) + child = SystemSecurityrolesIdSettingsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SecurityRoleSetting]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SecurityRoleSetting]: """ Performs a GET request against the /system/securityRoles/{id}/settings endpoint. @@ -64,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SecurityRoleSetting]: The parsed response data. """ - return self._parse_many(SecurityRoleSetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SecurityRoleSetting, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsIdEndpoint.py index 188f4f076..5f02acd0e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSecurityRolesIdSettingsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SecurityRoleSetting: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SecurityRoleSetting: """ Performs a GET request against the /system/securityRoles/{id}/settings/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SecurityRoleSetting: The parsed response data. """ - return self._parse_one(SecurityRoleSetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SecurityRoleSetting, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesCountEndpoint.py index 4fe68475b..d8eff032d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSecurityrolesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/securityroles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/securityroles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesEndpoint.py index 9dfda877a..4cd59d2b9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSecurityrolesIdEndpoint import SystemSecurityrolesIdEndpoint +from pyconnectwise.endpoints.manage.SystemSecurityrolesIdEndpoint import ( + SystemSecurityrolesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesIdEndpoint.py index d9c7e242d..6d965cbe7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSecurityrolesIdSettingsEndpoint import SystemSecurityrolesIdSettingsEndpoint +from pyconnectwise.endpoints.manage.SystemSecurityrolesIdSettingsEndpoint import ( + SystemSecurityrolesIdSettingsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesIdInfoEndpoint.py index 4e4482d63..7a4adc25b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SecurityRoleInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SecurityRoleInfo: """ Performs a GET request against the /system/securityroles/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SecurityRoleInfo: The parsed response data. """ - return self._parse_one(SecurityRoleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SecurityRoleInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesInfoCountEndpoint.py index fcc19ad8d..24af1008a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSecurityrolesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/securityroles/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/securityroles/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesInfoEndpoint.py index 669049367..05149e9d9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSecurityrolesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSecurityrolesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSecurityrolesInfoCountEndpoint import SystemSecurityrolesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemSecurityrolesInfoCountEndpoint import ( + SystemSecurityrolesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SecurityRoleInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemSecurityrolesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemSecurityrolesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSecurityrolesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SecurityRoleInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SecurityRoleInfo]: """ Performs a GET request against the /system/securityroles/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SecurityRoleInfo]: The parsed response data. """ - return self._parse_many(SecurityRoleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SecurityRoleInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSettingsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSettingsCountEndpoint.py index eebdb635a..adc98f673 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSettingsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSettingsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSettingsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/settings/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/settings/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSettingsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSettingsEndpoint.py index d0bec9ab7..89e712f15 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSettingsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSettingsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSettingsCountEndpoint import SystemSettingsCountEndpoint -from pyconnectwise.endpoints.manage.SystemSettingsIdEndpoint import SystemSettingsIdEndpoint +from pyconnectwise.endpoints.manage.SystemSettingsCountEndpoint import ( + SystemSettingsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSettingsIdEndpoint import ( + SystemSettingsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SystemSetting from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemSettingsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "settings", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemSettingsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSettingsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemSettingsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SystemSetting]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SystemSetting]: """ Performs a GET request against the /system/settings endpoint. @@ -60,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SystemSetting]: The parsed response data. """ - return self._parse_many(SystemSetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SystemSetting, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSettingsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSettingsIdEndpoint.py index 27464b5ba..54af9ea21 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSettingsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSettingsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SystemSetting: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SystemSetting: """ Performs a GET request against the /system/settings/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SystemSetting: The parsed response data. """ - return self._parse_one(SystemSetting, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SystemSetting, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SystemSetting: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SystemSetting: """ Performs a PUT request against the /system/settings/{id} endpoint. @@ -55,9 +61,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SystemSetting: The parsed response data. """ - return self._parse_one(SystemSetting, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SystemSetting, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SystemSetting: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SystemSetting: """ Performs a PATCH request against the /system/settings/{id} endpoint. @@ -67,4 +77,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SystemSetting: The parsed response data. """ - return self._parse_one(SystemSetting, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SystemSetting, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSetupScreensCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSetupScreensCountEndpoint.py index f565112f4..2d2f447b9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSetupScreensCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSetupScreensCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSetupscreensCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/setupScreens/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/setupScreens/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSetupScreensEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSetupScreensEndpoint.py index 0254016cb..5ebf476b4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSetupScreensEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSetupScreensEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSetupscreensCountEndpoint import SystemSetupscreensCountEndpoint -from pyconnectwise.endpoints.manage.SystemSetupscreensIdEndpoint import SystemSetupscreensIdEndpoint +from pyconnectwise.endpoints.manage.SystemSetupscreensCountEndpoint import ( + SystemSetupscreensCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSetupscreensIdEndpoint import ( + SystemSetupscreensIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SetupScreen from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemSetupscreensEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "setupScreens", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemSetupscreensCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSetupscreensCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemSetupscreensIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemSetupscreensIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SetupScreen]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SetupScreen]: """ Performs a GET request against the /system/setupScreens endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SetupScreen]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SetupScreen]: """ Performs a GET request against the /system/setupScreens endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SetupScreen]: The parsed response data. """ - return self._parse_many(SetupScreen, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SetupScreen, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSetupScreensIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSetupScreensIdEndpoint.py index 37a34104a..0a3b3a70d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSetupScreensIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSetupScreensIdEndpoint.py @@ -10,7 +10,9 @@ class SystemSetupscreensIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SetupScreen]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SetupScreen]: """ Performs a GET request against the /system/setupScreens/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SetupScreen: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SetupScreen: """ Performs a GET request against the /system/setupScreens/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SetupScreen: The parsed response data. """ - return self._parse_one(SetupScreen, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SetupScreen, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesCountEndpoint.py index 12251f1e6..3b62196bd 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSkillcategoriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/skillCategories/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/skillCategories/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesEndpoint.py index 19afea9cc..8ad15005b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSkillcategoriesCountEndpoint import SystemSkillcategoriesCountEndpoint -from pyconnectwise.endpoints.manage.SystemSkillcategoriesIdEndpoint import SystemSkillcategoriesIdEndpoint +from pyconnectwise.endpoints.manage.SystemSkillcategoriesCountEndpoint import ( + SystemSkillcategoriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSkillcategoriesIdEndpoint import ( + SystemSkillcategoriesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SkillCategory from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemSkillcategoriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "skillCategories", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemSkillcategoriesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSkillcategoriesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemSkillcategoriesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SkillCategory]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SkillCategory]: """ Performs a GET request against the /system/skillCategories endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SkillCategory]: The parsed response data. """ - return self._parse_many(SkillCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SkillCategory, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SkillCategory: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SkillCategory: """ Performs a POST request against the /system/skillCategories endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SkillCategory: The parsed response data. """ - return self._parse_one(SkillCategory, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SkillCategory, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesIdEndpoint.py index a7769e554..552961f63 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSkillCategoriesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SkillCategory: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SkillCategory: """ Performs a GET request against the /system/skillCategories/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SkillCategory: The parsed response data. """ - return self._parse_one(SkillCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SkillCategory, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/skillCategories/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SkillCategory: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SkillCategory: """ Performs a PUT request against the /system/skillCategories/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SkillCategory: The parsed response data. """ - return self._parse_one(SkillCategory, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SkillCategory, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SkillCategory: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SkillCategory: """ Performs a PATCH request against the /system/skillCategories/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SkillCategory: The parsed response data. """ - return self._parse_one(SkillCategory, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SkillCategory, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSkillsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSkillsCountEndpoint.py index c1d76f410..052180adc 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSkillsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSkillsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSkillsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/skills/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/skills/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSkillsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSkillsEndpoint.py index 4f062522f..5876d3608 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSkillsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSkillsEndpoint.py @@ -1,9 +1,13 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSkillsCountEndpoint import SystemSkillsCountEndpoint +from pyconnectwise.endpoints.manage.SystemSkillsCountEndpoint import ( + SystemSkillsCountEndpoint, +) from pyconnectwise.endpoints.manage.SystemSkillsIdEndpoint import SystemSkillsIdEndpoint -from pyconnectwise.endpoints.manage.SystemSkillsInfoEndpoint import SystemSkillsInfoEndpoint +from pyconnectwise.endpoints.manage.SystemSkillsInfoEndpoint import ( + SystemSkillsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Skill from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +17,12 @@ class SystemSkillsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "skills", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemSkillsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemSkillsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSkillsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemSkillsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemSkillsIdEndpoint: """ @@ -29,7 +37,9 @@ def id(self, id: int) -> SystemSkillsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Skill]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Skill]: """ Performs a GET request against the /system/skills endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +60,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Skill]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Skill]: """ Performs a GET request against the /system/skills endpoint. @@ -60,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Skill]: The parsed response data. """ - return self._parse_many(Skill, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Skill, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Skill: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Skill: """ Performs a POST request against the /system/skills endpoint. @@ -72,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Skill: The parsed response data. """ - return self._parse_one(Skill, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Skill, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSkillsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSkillsIdEndpoint.py index 3e9fb23f0..21bac623c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSkillsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSkillsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSkillsIdInfoEndpoint import SystemSkillsIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemSkillsIdInfoEndpoint import ( + SystemSkillsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Skill from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemSkillsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemSkillsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemSkillsIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Skill]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Skill]: """ Performs a GET request against the /system/skills/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Skill: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Skill: """ Performs a GET request against the /system/skills/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Skill: The parsed response data. """ - return self._parse_one(Skill, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Skill, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/skills/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Skill: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Skill: """ Performs a PUT request against the /system/skills/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Skill: The parsed response data. """ - return self._parse_one(Skill, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Skill, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Skill: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Skill: """ Performs a PATCH request against the /system/skills/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Skill: The parsed response data. """ - return self._parse_one(Skill, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Skill, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSkillsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSkillsIdInfoEndpoint.py index f66bf5d3a..da9a5c728 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSkillsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSkillsIdInfoEndpoint.py @@ -10,7 +10,9 @@ class SystemSkillsIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SkillInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SkillInfo]: """ Performs a GET request against the /system/skills/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SkillInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SkillInfo: """ Performs a GET request against the /system/skills/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SkillInfo: The parsed response data. """ - return self._parse_one(SkillInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SkillInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSkillsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSkillsInfoCountEndpoint.py index a50d4b57b..15c4cc4d9 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSkillsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSkillsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSkillsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/skills/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/skills/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSkillsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSkillsInfoEndpoint.py index fac631015..bad845d80 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSkillsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSkillsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSkillsInfoCountEndpoint import SystemSkillsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemSkillsInfoCountEndpoint import ( + SystemSkillsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SkillInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemSkillsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemSkillsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSkillsInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SkillInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SkillInfo]: """ Performs a GET request against the /system/skills/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SkillInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SkillInfo]: """ Performs a GET request against the /system/skills/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SkillInfo]: The parsed response data. """ - return self._parse_many(SkillInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SkillInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsCountEndpoint.py index 997bb10e6..7eb838237 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSsoconfigurationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/ssoConfigurations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/ssoConfigurations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsEndpoint.py index 4a8a212af..356c16b4c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSsoconfigurationsCountEndpoint import SystemSsoconfigurationsCountEndpoint -from pyconnectwise.endpoints.manage.SystemSsoconfigurationsIdEndpoint import SystemSsoconfigurationsIdEndpoint +from pyconnectwise.endpoints.manage.SystemSsoconfigurationsCountEndpoint import ( + SystemSsoconfigurationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSsoconfigurationsIdEndpoint import ( + SystemSsoconfigurationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SsoConfiguration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemSsoconfigurationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "ssoConfigurations", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemSsoconfigurationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSsoconfigurationsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemSsoconfigurationsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SsoConfiguration]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SsoConfiguration]: """ Performs a GET request against the /system/ssoConfigurations endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SsoConfiguration]: The parsed response data. """ - return self._parse_many(SsoConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SsoConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SsoConfiguration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SsoConfiguration: """ Performs a POST request against the /system/ssoConfigurations endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SsoConfiguration: The parsed response data. """ - return self._parse_one(SsoConfiguration, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SsoConfiguration, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdEndpoint.py index a245b1899..ba1965798 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSsoconfigurationsIdRegistertokenEndpoint import \ - SystemSsoconfigurationsIdRegistertokenEndpoint -from pyconnectwise.endpoints.manage.SystemSsoconfigurationsIdSubmitmembersEndpoint import \ - SystemSsoconfigurationsIdSubmitmembersEndpoint +from pyconnectwise.endpoints.manage.SystemSsoconfigurationsIdRegistertokenEndpoint import ( + SystemSsoconfigurationsIdRegistertokenEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSsoconfigurationsIdSubmitmembersEndpoint import ( + SystemSsoconfigurationsIdSubmitmembersEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SsoConfiguration from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -44,7 +46,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SsoConfiguration: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SsoConfiguration: """ Performs a GET request against the /system/ssoConfigurations/{id} endpoint. @@ -54,9 +58,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SsoConfiguration: The parsed response data. """ - return self._parse_one(SsoConfiguration, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SsoConfiguration, + super()._make_request("GET", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SsoConfiguration: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SsoConfiguration: """ Performs a PUT request against the /system/ssoConfigurations/{id} endpoint. @@ -66,9 +75,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SsoConfiguration: The parsed response data. """ - return self._parse_one(SsoConfiguration, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SsoConfiguration, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SsoConfiguration: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SsoConfiguration: """ Performs a PATCH request against the /system/ssoConfigurations/{id} endpoint. @@ -78,9 +92,14 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SsoConfiguration: The parsed response data. """ - return self._parse_one(SsoConfiguration, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SsoConfiguration, + super()._make_request("PATCH", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/ssoConfigurations/{id} endpoint. @@ -90,4 +109,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdRegistertokenEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdRegistertokenEndpoint.py index dbc44a4ea..534e821a1 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdRegistertokenEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdRegistertokenEndpoint.py @@ -10,7 +10,9 @@ class SystemSsoconfigurationsIdRegistertokenEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "registertoken", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SsoConfiguration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SsoConfiguration: """ Performs a POST request against the /system/ssoConfigurations/{id}/registertoken endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SsoConfiguration: The parsed response data. """ - return self._parse_one(SsoConfiguration, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SsoConfiguration, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdSubmitmembersEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdSubmitmembersEndpoint.py index d018a7d5b..315ce70fb 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdSubmitmembersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSsoConfigurationsIdSubmitmembersEndpoint.py @@ -10,7 +10,9 @@ class SystemSsoconfigurationsIdSubmitmembersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "submitmembers", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SsoConfiguration: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SsoConfiguration: """ Performs a POST request against the /system/ssoConfigurations/{id}/submitmembers endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SsoConfiguration: The parsed response data. """ - return self._parse_one(SsoConfiguration, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SsoConfiguration, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSsoUsersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSsoUsersCountEndpoint.py index b27cd7e50..9858ff3e4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSsoUsersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSsoUsersCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSsousersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/ssoUsers/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/ssoUsers/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSsoUsersEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSsoUsersEndpoint.py index c1f3647e7..11629eed7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSsoUsersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSsoUsersEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSsousersCountEndpoint import SystemSsousersCountEndpoint -from pyconnectwise.endpoints.manage.SystemSsousersIdEndpoint import SystemSsousersIdEndpoint +from pyconnectwise.endpoints.manage.SystemSsousersCountEndpoint import ( + SystemSsousersCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSsousersIdEndpoint import ( + SystemSsousersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SsoUser from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemSsousersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "ssoUsers", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemSsousersCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSsousersCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemSsousersIdEndpoint: """ @@ -27,7 +33,9 @@ def id(self, id: int) -> SystemSsousersIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SsoUser]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SsoUser]: """ Performs a GET request against the /system/ssoUsers endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +56,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SsoUser]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SsoUser]: """ Performs a GET request against the /system/ssoUsers endpoint. @@ -58,4 +68,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SsoUser]: The parsed response data. """ - return self._parse_many(SsoUser, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SsoUser, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSsoUsersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSsoUsersIdEndpoint.py index 760b6d64e..23769d9a8 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSsoUsersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSsoUsersIdEndpoint.py @@ -10,7 +10,9 @@ class SystemSsousersIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SsoUser]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SsoUser]: """ Performs a GET request against the /system/ssoUsers/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SsoUser: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SsoUser: """ Performs a GET request against the /system/ssoUsers/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SsoUser: The parsed response data. """ - return self._parse_one(SsoUser, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SsoUser, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemStandardNotesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemStandardNotesCountEndpoint.py index 832a2fd92..464ba5204 100644 --- a/src/pyconnectwise/endpoints/manage/SystemStandardNotesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemStandardNotesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemStandardnotesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/standardNotes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/standardNotes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemStandardNotesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemStandardNotesEndpoint.py index 758376846..e97d55013 100644 --- a/src/pyconnectwise/endpoints/manage/SystemStandardNotesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemStandardNotesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemStandardnotesCountEndpoint import SystemStandardnotesCountEndpoint -from pyconnectwise.endpoints.manage.SystemStandardnotesIdEndpoint import SystemStandardnotesIdEndpoint +from pyconnectwise.endpoints.manage.SystemStandardnotesCountEndpoint import ( + SystemStandardnotesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemStandardnotesIdEndpoint import ( + SystemStandardnotesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import StandardNote from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemStandardnotesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "standardNotes", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemStandardnotesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemStandardnotesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemStandardnotesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[StandardNote]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[StandardNote]: """ Performs a GET request against the /system/standardNotes endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[StandardNote]: The parsed response data. """ - return self._parse_many(StandardNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + StandardNote, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> StandardNote: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> StandardNote: """ Performs a POST request against the /system/standardNotes endpoint. @@ -72,4 +84,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: StandardNote: The parsed response data. """ - return self._parse_one(StandardNote, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + StandardNote, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemStandardNotesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemStandardNotesIdEndpoint.py index 17f465dbd..0d0e1d11d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemStandardNotesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemStandardNotesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> StandardNote: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> StandardNote: """ Performs a GET request against the /system/standardNotes/{id} endpoint. @@ -43,9 +45,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: StandardNote: The parsed response data. """ - return self._parse_one(StandardNote, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + StandardNote, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/standardNotes/{id} endpoint. @@ -55,9 +61,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> StandardNote: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> StandardNote: """ Performs a PUT request against the /system/standardNotes/{id} endpoint. @@ -67,9 +78,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: StandardNote: The parsed response data. """ - return self._parse_one(StandardNote, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + StandardNote, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> StandardNote: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> StandardNote: """ Performs a PATCH request against the /system/standardNotes/{id} endpoint. @@ -79,4 +94,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: StandardNote: The parsed response data. """ - return self._parse_one(StandardNote, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + StandardNote, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysCountEndpoint.py index e4df2badb..5e760d407 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSurveysCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/surveys/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/surveys/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysEndpoint.py index 95ca4d0b7..9235375d4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysCountEndpoint import SystemSurveysCountEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysIdEndpoint import SystemSurveysIdEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysInfoEndpoint import SystemSurveysInfoEndpoint +from pyconnectwise.endpoints.manage.SystemSurveysCountEndpoint import ( + SystemSurveysCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSurveysIdEndpoint import ( + SystemSurveysIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSurveysInfoEndpoint import ( + SystemSurveysInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Survey from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemSurveysEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "surveys", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemSurveysInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemSurveysCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSurveysCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemSurveysInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemSurveysIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> SystemSurveysIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Survey]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Survey]: """ Performs a GET request against the /system/surveys endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Survey]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Survey]: """ Performs a GET request against the /system/surveys endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Survey]: The parsed response data. """ - return self._parse_many(Survey, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Survey, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Survey: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Survey: """ Performs a POST request against the /system/surveys endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Survey: The parsed response data. """ - return self._parse_one(Survey, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Survey, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysIdCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysIdCopyEndpoint.py index baa20435c..640a63187 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysIdCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysIdCopyEndpoint.py @@ -10,7 +10,9 @@ class SystemSurveysIdCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Survey: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Survey: """ Performs a POST request against the /system/surveys/{id}/copy endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Survey: The parsed response data. """ - return self._parse_one(Survey, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Survey, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysIdEndpoint.py index 87ab73012..0aa9bff09 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysIdEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysIdCopyEndpoint import SystemSurveysIdCopyEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysIdInfoEndpoint import SystemSurveysIdInfoEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsEndpoint import SystemSurveysIdQuestionsEndpoint +from pyconnectwise.endpoints.manage.SystemSurveysIdCopyEndpoint import ( + SystemSurveysIdCopyEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSurveysIdInfoEndpoint import ( + SystemSurveysIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsEndpoint import ( + SystemSurveysIdQuestionsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Survey from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,11 +19,19 @@ class SystemSurveysIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemSurveysIdInfoEndpoint(client, parent_endpoint=self)) - self.questions = self._register_child_endpoint(SystemSurveysIdQuestionsEndpoint(client, parent_endpoint=self)) - self.copy = self._register_child_endpoint(SystemSurveysIdCopyEndpoint(client, parent_endpoint=self)) + self.questions = self._register_child_endpoint( + SystemSurveysIdQuestionsEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemSurveysIdInfoEndpoint(client, parent_endpoint=self) + ) + self.copy = self._register_child_endpoint( + SystemSurveysIdCopyEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Survey]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Survey]: """ Performs a GET request against the /system/surveys/{id} endpoint and returns an initialized PaginatedResponse object. @@ -38,7 +52,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Survey: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Survey: """ Performs a GET request against the /system/surveys/{id} endpoint. @@ -48,9 +64,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Survey: The parsed response data. """ - return self._parse_one(Survey, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Survey, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/surveys/{id} endpoint. @@ -60,9 +80,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Survey: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Survey: """ Performs a PUT request against the /system/surveys/{id} endpoint. @@ -72,9 +97,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: Survey: The parsed response data. """ - return self._parse_one(Survey, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Survey, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Survey: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Survey: """ Performs a PATCH request against the /system/surveys/{id} endpoint. @@ -84,4 +113,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Survey: The parsed response data. """ - return self._parse_one(Survey, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Survey, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysIdInfoEndpoint.py index 9423f6807..bde1b39b5 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysIdInfoEndpoint.py @@ -10,7 +10,9 @@ class SystemSurveysIdInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SurveyInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SurveyInfo]: """ Performs a GET request against the /system/surveys/{id}/info endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyInfo: """ Performs a GET request against the /system/surveys/{id}/info endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SurveyInfo: The parsed response data. """ - return self._parse_one(SurveyInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SurveyInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsCountEndpoint.py index b38372564..c3a4f5e64 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSurveysIdQuestionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/surveys/{id}/questions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/surveys/{id}/questions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsEndpoint.py index 27a19dbc1..9137db34a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsCountEndpoint import SystemSurveysIdQuestionsCountEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsIdEndpoint import SystemSurveysIdQuestionsIdEndpoint +from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsCountEndpoint import ( + SystemSurveysIdQuestionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsIdEndpoint import ( + SystemSurveysIdQuestionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SurveyQuestion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemSurveysIdQuestionsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "questions", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemSurveysIdQuestionsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSurveysIdQuestionsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemSurveysIdQuestionsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SurveyQuestion]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SurveyQuestion]: """ Performs a GET request against the /system/surveys/{id}/questions endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SurveyQuestion]: The parsed response data. """ - return self._parse_many(SurveyQuestion, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SurveyQuestion, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyQuestion: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyQuestion: """ Performs a POST request against the /system/surveys/{id}/questions endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SurveyQuestion: The parsed response data. """ - return self._parse_one(SurveyQuestion, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SurveyQuestion, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdEndpoint.py index d787467a0..372b44b8a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsIdValuesEndpoint import \ - SystemSurveysIdQuestionsIdValuesEndpoint +from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsIdValuesEndpoint import ( + SystemSurveysIdQuestionsIdValuesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SurveyQuestion from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyQuestion: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyQuestion: """ Performs a GET request against the /system/surveys/{id}/questions/{id} endpoint. @@ -49,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SurveyQuestion: The parsed response data. """ - return self._parse_one(SurveyQuestion, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SurveyQuestion, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/surveys/{id}/questions/{id} endpoint. @@ -61,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyQuestion: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyQuestion: """ Performs a PUT request against the /system/surveys/{id}/questions/{id} endpoint. @@ -73,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SurveyQuestion: The parsed response data. """ - return self._parse_one(SurveyQuestion, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SurveyQuestion, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyQuestion: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyQuestion: """ Performs a PATCH request against the /system/surveys/{id}/questions/{id} endpoint. @@ -85,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SurveyQuestion: The parsed response data. """ - return self._parse_one(SurveyQuestion, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SurveyQuestion, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdValuesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdValuesEndpoint.py index 9f469cd3b..82423d521 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdValuesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdValuesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsIdValuesIdEndpoint import \ - SystemSurveysIdQuestionsIdValuesIdEndpoint +from pyconnectwise.endpoints.manage.SystemSurveysIdQuestionsIdValuesIdEndpoint import ( + SystemSurveysIdQuestionsIdValuesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SurveyQuestionValue from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -21,7 +22,9 @@ def id(self, id: int) -> SystemSurveysIdQuestionsIdValuesIdEndpoint: Returns: SystemSurveysIdQuestionsIdValuesIdEndpoint: The initialized SystemSurveysIdQuestionsIdValuesIdEndpoint object. """ - child = SystemSurveysIdQuestionsIdValuesIdEndpoint(self.client, parent_endpoint=self) + child = SystemSurveysIdQuestionsIdValuesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -48,7 +51,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SurveyQuestionValue]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SurveyQuestionValue]: """ Performs a GET request against the /system/surveys/{id}/questions/{id}/values endpoint. @@ -58,9 +63,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SurveyQuestionValue]: The parsed response data. """ - return self._parse_many(SurveyQuestionValue, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SurveyQuestionValue, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyQuestionValue: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyQuestionValue: """ Performs a POST request against the /system/surveys/{id}/questions/{id}/values endpoint. @@ -70,4 +80,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SurveyQuestionValue: The parsed response data. """ - return self._parse_one(SurveyQuestionValue, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SurveyQuestionValue, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdValuesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdValuesIdEndpoint.py index b9b544b00..101c00bf0 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdValuesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysIdQuestionsIdValuesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyQuestionValue: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyQuestionValue: """ Performs a GET request against the /system/surveys/{id}/questions/{id}/values/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SurveyQuestionValue: The parsed response data. """ - return self._parse_one(SurveyQuestionValue, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + SurveyQuestionValue, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/surveys/{id}/questions/{id}/values/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyQuestionValue: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyQuestionValue: """ Performs a PUT request against the /system/surveys/{id}/questions/{id}/values/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: SurveyQuestionValue: The parsed response data. """ - return self._parse_one(SurveyQuestionValue, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + SurveyQuestionValue, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SurveyQuestionValue: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SurveyQuestionValue: """ Performs a PATCH request against the /system/surveys/{id}/questions/{id}/values/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SurveyQuestionValue: The parsed response data. """ - return self._parse_one(SurveyQuestionValue, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + SurveyQuestionValue, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysInfoCountEndpoint.py index f259230c7..81d233ed0 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemSurveysInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/surveys/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/surveys/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemSurveysInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemSurveysInfoEndpoint.py index d3c4e1e9b..1086a63a2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemSurveysInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemSurveysInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemSurveysInfoCountEndpoint import SystemSurveysInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemSurveysInfoCountEndpoint import ( + SystemSurveysInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import SurveyInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class SystemSurveysInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemSurveysInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemSurveysInfoCountEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[SurveyInfo]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[SurveyInfo]: """ Performs a GET request against the /system/surveys/info endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[SurveyInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[SurveyInfo]: """ Performs a GET request against the /system/surveys/info endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[SurveyInfo]: The parsed response data. """ - return self._parse_many(SurveyInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + SurveyInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsCountEndpoint.py index cf9d60dc1..4ccd097b0 100644 --- a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemTimezonesetupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/timeZoneSetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/timeZoneSetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsEndpoint.py index 42f353d30..224aeba0d 100644 --- a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemTimezonesetupsCountEndpoint import SystemTimezonesetupsCountEndpoint -from pyconnectwise.endpoints.manage.SystemTimezonesetupsIdEndpoint import SystemTimezonesetupsIdEndpoint -from pyconnectwise.endpoints.manage.SystemTimezonesetupsInfoEndpoint import SystemTimezonesetupsInfoEndpoint +from pyconnectwise.endpoints.manage.SystemTimezonesetupsCountEndpoint import ( + SystemTimezonesetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemTimezonesetupsIdEndpoint import ( + SystemTimezonesetupsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemTimezonesetupsInfoEndpoint import ( + SystemTimezonesetupsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeZoneSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemTimezonesetupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "timeZoneSetups", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemTimezonesetupsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemTimezonesetupsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemTimezonesetupsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemTimezonesetupsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemTimezonesetupsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeZoneSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeZoneSetup]: """ Performs a GET request against the /system/timeZoneSetups endpoint. @@ -62,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeZoneSetup]: The parsed response data. """ - return self._parse_many(TimeZoneSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeZoneSetup, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeZoneSetup: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeZoneSetup: """ Performs a POST request against the /system/timeZoneSetups endpoint. @@ -74,4 +90,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimeZoneSetup: The parsed response data. """ - return self._parse_one(TimeZoneSetup, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TimeZoneSetup, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsIdEndpoint.py index 96192498f..f5bd1bfb6 100644 --- a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemTimezonesetupsIdInfoEndpoint import SystemTimezonesetupsIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemTimezonesetupsIdInfoEndpoint import ( + SystemTimezonesetupsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeZoneSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemTimezonesetupsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemTimezonesetupsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemTimezonesetupsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeZoneSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeZoneSetup: """ Performs a GET request against the /system/timeZoneSetups/{id} endpoint. @@ -46,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeZoneSetup: The parsed response data. """ - return self._parse_one(TimeZoneSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimeZoneSetup, super()._make_request("GET", data=data, params=params).json() + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeZoneSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeZoneSetup: """ Performs a PUT request against the /system/timeZoneSetups/{id} endpoint. @@ -58,9 +68,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeZoneSetup: The parsed response data. """ - return self._parse_one(TimeZoneSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TimeZoneSetup, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeZoneSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeZoneSetup: """ Performs a PATCH request against the /system/timeZoneSetups/{id} endpoint. @@ -70,9 +84,14 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimeZoneSetup: The parsed response data. """ - return self._parse_one(TimeZoneSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TimeZoneSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/timeZoneSetups/{id} endpoint. @@ -82,4 +101,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsIdInfoEndpoint.py index 5270b5c8a..f89cc689a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeZoneSetupInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeZoneSetupInfo: """ Performs a GET request against the /system/timeZoneSetups/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeZoneSetupInfo: The parsed response data. """ - return self._parse_one(TimeZoneSetupInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimeZoneSetupInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsInfoCountEndpoint.py index 26241b47b..51d09e882 100644 --- a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemTimezonesetupsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/timeZoneSetups/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/timeZoneSetups/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsInfoEndpoint.py index 4cbccac25..18994fe5e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemTimeZoneSetupsInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemTimezonesetupsInfoCountEndpoint import SystemTimezonesetupsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemTimezonesetupsInfoCountEndpoint import ( + SystemTimezonesetupsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeZoneSetupInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemTimezonesetupsInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemTimezonesetupsInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemTimezonesetupsInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeZoneSetupInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeZoneSetupInfo]: """ Performs a GET request against the /system/timeZoneSetups/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeZoneSetupInfo]: The parsed response data. """ - return self._parse_many(TimeZoneSetupInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeZoneSetupInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesCountEndpoint.py index 947af7035..4a90595f7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemTodaypagecategoriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/todayPageCategories/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/todayPageCategories/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesEndpoint.py index 21da6efc9..a89c0a8d3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemTodaypagecategoriesCountEndpoint import SystemTodaypagecategoriesCountEndpoint -from pyconnectwise.endpoints.manage.SystemTodaypagecategoriesIdEndpoint import SystemTodaypagecategoriesIdEndpoint +from pyconnectwise.endpoints.manage.SystemTodaypagecategoriesCountEndpoint import ( + SystemTodaypagecategoriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemTodaypagecategoriesIdEndpoint import ( + SystemTodaypagecategoriesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TodayPageCategory from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemTodaypagecategoriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "todayPageCategories", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemTodaypagecategoriesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemTodaypagecategoriesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemTodaypagecategoriesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TodayPageCategory]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TodayPageCategory]: """ Performs a GET request against the /system/todayPageCategories endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TodayPageCategory]: The parsed response data. """ - return self._parse_many(TodayPageCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TodayPageCategory, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TodayPageCategory: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TodayPageCategory: """ Performs a POST request against the /system/todayPageCategories endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TodayPageCategory: The parsed response data. """ - return self._parse_one(TodayPageCategory, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TodayPageCategory, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesIdEndpoint.py index c1a7e8f58..954db5efc 100644 --- a/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemTodayPageCategoriesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TodayPageCategory: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TodayPageCategory: """ Performs a GET request against the /system/todayPageCategories/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TodayPageCategory: The parsed response data. """ - return self._parse_one(TodayPageCategory, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TodayPageCategory, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/todayPageCategories/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TodayPageCategory: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TodayPageCategory: """ Performs a PUT request against the /system/todayPageCategories/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TodayPageCategory: The parsed response data. """ - return self._parse_one(TodayPageCategory, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TodayPageCategory, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TodayPageCategory: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TodayPageCategory: """ Performs a PATCH request against the /system/todayPageCategories/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TodayPageCategory: The parsed response data. """ - return self._parse_one(TodayPageCategory, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TodayPageCategory, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsCountEndpoint.py index 611ab3d87..c5ea8387c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemUserdefinedfieldsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/userDefinedFields/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/userDefinedFields/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsEndpoint.py index b1b829e29..dcf4bd671 100644 --- a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsCountEndpoint import SystemUserdefinedfieldsCountEndpoint -from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsIdEndpoint import SystemUserdefinedfieldsIdEndpoint -from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsInfoEndpoint import SystemUserdefinedfieldsInfoEndpoint +from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsCountEndpoint import ( + SystemUserdefinedfieldsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsIdEndpoint import ( + SystemUserdefinedfieldsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsInfoEndpoint import ( + SystemUserdefinedfieldsInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UserDefinedField from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemUserdefinedfieldsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "userDefinedFields", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemUserdefinedfieldsInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemUserdefinedfieldsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemUserdefinedfieldsCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemUserdefinedfieldsInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemUserdefinedfieldsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UserDefinedField]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UserDefinedField]: """ Performs a GET request against the /system/userDefinedFields endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[UserDefinedField]: The parsed response data. """ - return self._parse_many(UserDefinedField, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + UserDefinedField, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserDefinedField: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserDefinedField: """ Performs a POST request against the /system/userDefinedFields endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: UserDefinedField: The parsed response data. """ - return self._parse_one(UserDefinedField, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + UserDefinedField, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsIdEndpoint.py index 69f4ad0d2..cbc3f8665 100644 --- a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsIdInfoEndpoint import SystemUserdefinedfieldsIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsIdInfoEndpoint import ( + SystemUserdefinedfieldsIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UserDefinedField from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class SystemUserdefinedfieldsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemUserdefinedfieldsIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemUserdefinedfieldsIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserDefinedField: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserDefinedField: """ Performs a GET request against the /system/userDefinedFields/{id} endpoint. @@ -46,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UserDefinedField: The parsed response data. """ - return self._parse_one(UserDefinedField, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UserDefinedField, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/userDefinedFields/{id} endpoint. @@ -58,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserDefinedField: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserDefinedField: """ Performs a PUT request against the /system/userDefinedFields/{id} endpoint. @@ -70,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UserDefinedField: The parsed response data. """ - return self._parse_one(UserDefinedField, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + UserDefinedField, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserDefinedField: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserDefinedField: """ Performs a PATCH request against the /system/userDefinedFields/{id} endpoint. @@ -82,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: UserDefinedField: The parsed response data. """ - return self._parse_one(UserDefinedField, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + UserDefinedField, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsIdInfoEndpoint.py index f059d7d33..ee9b803f4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> UserDefinedFieldInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> UserDefinedFieldInfo: """ Performs a GET request against the /system/userDefinedFields/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> U Returns: UserDefinedFieldInfo: The parsed response data. """ - return self._parse_one(UserDefinedFieldInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + UserDefinedFieldInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsInfoCountEndpoint.py index 30b5f3879..d55afc6d7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemUserdefinedfieldsInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/userDefinedFields/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/userDefinedFields/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsInfoEndpoint.py index 65ba3e36a..e4683d8c4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemUserDefinedFieldsInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsInfoCountEndpoint import \ - SystemUserdefinedfieldsInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemUserdefinedfieldsInfoCountEndpoint import ( + SystemUserdefinedfieldsInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import UserDefinedFieldInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[UserDefinedFieldInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[UserDefinedFieldInfo]: """ Performs a GET request against the /system/userDefinedFields/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[UserDefinedFieldInfo]: The parsed response data. """ - return self._parse_many(UserDefinedFieldInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + UserDefinedFieldInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersCountEndpoint.py index 376941be4..5a7f4b8c2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowactionsIdAutomateparametersCountEndpoint(ConnectWiseEndpoint def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflowActions/{id}/automateParameters/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflowActions/{id}/automateParameters/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersEndpoint.py index be555dbcc..38c0c0355 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowactionsIdAutomateparametersCountEndpoint import \ - SystemWorkflowactionsIdAutomateparametersCountEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowactionsIdAutomateparametersIdEndpoint import \ - SystemWorkflowactionsIdAutomateparametersIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowactionsIdAutomateparametersCountEndpoint import ( + SystemWorkflowactionsIdAutomateparametersCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowactionsIdAutomateparametersIdEndpoint import ( + SystemWorkflowactionsIdAutomateparametersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowActionAutomateParameter from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,7 +17,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "automateParameters", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - SystemWorkflowactionsIdAutomateparametersCountEndpoint(client, parent_endpoint=self) + SystemWorkflowactionsIdAutomateparametersCountEndpoint( + client, parent_endpoint=self + ) ) def id(self, id: int) -> SystemWorkflowactionsIdAutomateparametersIdEndpoint: @@ -27,7 +31,9 @@ def id(self, id: int) -> SystemWorkflowactionsIdAutomateparametersIdEndpoint: Returns: SystemWorkflowactionsIdAutomateparametersIdEndpoint: The initialized SystemWorkflowactionsIdAutomateparametersIdEndpoint object. """ - child = SystemWorkflowactionsIdAutomateparametersIdEndpoint(self.client, parent_endpoint=self) + child = SystemWorkflowactionsIdAutomateparametersIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -67,10 +73,13 @@ def get( list[WorkflowActionAutomateParameter]: The parsed response data. """ return self._parse_many( - WorkflowActionAutomateParameter, super()._make_request("GET", data=data, params=params).json() + WorkflowActionAutomateParameter, + super()._make_request("GET", data=data, params=params).json(), ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionAutomateParameter: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowActionAutomateParameter: """ Performs a POST request against the /system/workflowActions/{id}/automateParameters endpoint. @@ -81,5 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionAutomateParameter: The parsed response data. """ return self._parse_one( - WorkflowActionAutomateParameter, super()._make_request("POST", data=data, params=params).json() + WorkflowActionAutomateParameter, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersIdEndpoint.py index ff358af4b..693269326 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowActionsIdAutomateParametersIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionAutomateParameter: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowActionAutomateParameter: """ Performs a GET request against the /system/workflowActions/{id}/automateParameters/{id} endpoint. @@ -44,10 +46,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W WorkflowActionAutomateParameter: The parsed response data. """ return self._parse_one( - WorkflowActionAutomateParameter, super()._make_request("GET", data=data, params=params).json() + WorkflowActionAutomateParameter, + super()._make_request("GET", data=data, params=params).json(), ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/workflowActions/{id}/automateParameters/{id} endpoint. @@ -57,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionAutomateParameter: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowActionAutomateParameter: """ Performs a PUT request against the /system/workflowActions/{id}/automateParameters/{id} endpoint. @@ -70,10 +80,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W WorkflowActionAutomateParameter: The parsed response data. """ return self._parse_one( - WorkflowActionAutomateParameter, super()._make_request("PUT", data=data, params=params).json() + WorkflowActionAutomateParameter, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionAutomateParameter: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowActionAutomateParameter: """ Performs a PATCH request against the /system/workflowActions/{id}/automateParameters/{id} endpoint. @@ -84,5 +97,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionAutomateParameter: The parsed response data. """ return self._parse_one( - WorkflowActionAutomateParameter, super()._make_request("PATCH", data=data, params=params).json() + WorkflowActionAutomateParameter, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowactionsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowactionsEndpoint.py index 98ba6d106..f7c1d1828 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowactionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowactionsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowactionsIdEndpoint import SystemWorkflowactionsIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowactionsIdEndpoint import ( + SystemWorkflowactionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowactionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowactionsIdEndpoint.py index 71c5b3dc7..00ffbce7a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowactionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowactionsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowactionsIdAutomateparametersEndpoint import \ - SystemWorkflowactionsIdAutomateparametersEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowactionsIdAutomateparametersEndpoint import ( + SystemWorkflowactionsIdAutomateparametersEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,5 +13,7 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.automate_parameters = self._register_child_endpoint( - SystemWorkflowactionsIdAutomateparametersEndpoint(client, parent_endpoint=self) + SystemWorkflowactionsIdAutomateparametersEndpoint( + client, parent_endpoint=self + ) ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsCountEndpoint.py index 6cb6e020e..6710629d4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsEndpoint.py index f028be613..53383c305 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsEndpoint.py @@ -1,11 +1,18 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsCountEndpoint import SystemWorkflowsCountEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdEndpoint import SystemWorkflowsIdEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesEndpoint import SystemWorkflowsTabletypesEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEndpoint import \ - SystemWorkflowsUserdefinedfieldsEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsCountEndpoint import ( + SystemWorkflowsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdEndpoint import ( + SystemWorkflowsIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesEndpoint import ( + SystemWorkflowsTabletypesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEndpoint import ( + SystemWorkflowsUserdefinedfieldsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Workflow from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -18,10 +25,12 @@ def __init__(self, client, parent_endpoint=None): self.userdefinedfields = self._register_child_endpoint( SystemWorkflowsUserdefinedfieldsEndpoint(client, parent_endpoint=self) ) - self.count = self._register_child_endpoint(SystemWorkflowsCountEndpoint(client, parent_endpoint=self)) self.table_types = self._register_child_endpoint( SystemWorkflowsTabletypesEndpoint(client, parent_endpoint=self) ) + self.count = self._register_child_endpoint( + SystemWorkflowsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemWorkflowsIdEndpoint: """ @@ -36,7 +45,9 @@ def id(self, id: int) -> SystemWorkflowsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Workflow]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Workflow]: """ Performs a GET request against the /system/workflows endpoint and returns an initialized PaginatedResponse object. @@ -57,7 +68,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Workflow]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Workflow]: """ Performs a GET request against the /system/workflows endpoint. @@ -67,9 +80,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Workflow]: The parsed response data. """ - return self._parse_many(Workflow, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Workflow, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Workflow: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Workflow: """ Performs a POST request against the /system/workflows endpoint. @@ -79,4 +96,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Workflow: The parsed response data. """ - return self._parse_one(Workflow, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Workflow, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsCountEndpoint.py index 92975e8c6..9ff82e56a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsIdAttachmentsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/{id}/attachments/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/{id}/attachments/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsEndpoint.py index df9083bb0..3dc6bca73 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsEndpoint.py @@ -1,9 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdAttachmentsCountEndpoint import \ - SystemWorkflowsIdAttachmentsCountEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdAttachmentsIdEndpoint import SystemWorkflowsIdAttachmentsIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdAttachmentsCountEndpoint import ( + SystemWorkflowsIdAttachmentsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdAttachmentsIdEndpoint import ( + SystemWorkflowsIdAttachmentsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowAttachment from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -26,7 +29,9 @@ def id(self, id: int) -> SystemWorkflowsIdAttachmentsIdEndpoint: Returns: SystemWorkflowsIdAttachmentsIdEndpoint: The initialized SystemWorkflowsIdAttachmentsIdEndpoint object. """ - child = SystemWorkflowsIdAttachmentsIdEndpoint(self.client, parent_endpoint=self) + child = SystemWorkflowsIdAttachmentsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -53,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowAttachment]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowAttachment]: """ Performs a GET request against the /system/workflows/{id}/attachments endpoint. @@ -63,4 +70,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkflowAttachment]: The parsed response data. """ - return self._parse_many(WorkflowAttachment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkflowAttachment, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsIdEndpoint.py index 72feba784..d6470c6e2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdAttachmentsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowAttachment: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowAttachment: """ Performs a GET request against the /system/workflows/{id}/attachments/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkflowAttachment: The parsed response data. """ - return self._parse_one(WorkflowAttachment, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkflowAttachment, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdCopyEndpoint.py index a19891cbb..229648bdf 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdCopyEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsIdCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Workflow: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Workflow: """ Performs a POST request against the /system/workflows/{id}/copy endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Workflow: The parsed response data. """ - return self._parse_one(Workflow, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + Workflow, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEndpoint.py index a2a677ac7..5a05a4e42 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEndpoint.py @@ -1,11 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdAttachmentsEndpoint import SystemWorkflowsIdAttachmentsEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdCopyEndpoint import SystemWorkflowsIdCopyEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsEndpoint import SystemWorkflowsIdEventsEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesEndpoint import SystemWorkflowsIdNotifytypesEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersEndpoint import SystemWorkflowsIdTriggersEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdAttachmentsEndpoint import ( + SystemWorkflowsIdAttachmentsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdCopyEndpoint import ( + SystemWorkflowsIdCopyEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsEndpoint import ( + SystemWorkflowsIdEventsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesEndpoint import ( + SystemWorkflowsIdNotifytypesEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersEndpoint import ( + SystemWorkflowsIdTriggersEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Workflow from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,17 +25,25 @@ class SystemWorkflowsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.events = self._register_child_endpoint(SystemWorkflowsIdEventsEndpoint(client, parent_endpoint=self)) + self.copy = self._register_child_endpoint( + SystemWorkflowsIdCopyEndpoint(client, parent_endpoint=self) + ) self.notify_types = self._register_child_endpoint( SystemWorkflowsIdNotifytypesEndpoint(client, parent_endpoint=self) ) - self.triggers = self._register_child_endpoint(SystemWorkflowsIdTriggersEndpoint(client, parent_endpoint=self)) - self.copy = self._register_child_endpoint(SystemWorkflowsIdCopyEndpoint(client, parent_endpoint=self)) + self.events = self._register_child_endpoint( + SystemWorkflowsIdEventsEndpoint(client, parent_endpoint=self) + ) self.attachments = self._register_child_endpoint( SystemWorkflowsIdAttachmentsEndpoint(client, parent_endpoint=self) ) + self.triggers = self._register_child_endpoint( + SystemWorkflowsIdTriggersEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Workflow]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Workflow]: """ Performs a GET request against the /system/workflows/{id} endpoint and returns an initialized PaginatedResponse object. @@ -46,7 +64,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Workflow: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Workflow: """ Performs a GET request against the /system/workflows/{id} endpoint. @@ -56,9 +76,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: Workflow: The parsed response data. """ - return self._parse_one(Workflow, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Workflow, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/workflows/{id} endpoint. @@ -68,9 +92,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Workflow: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Workflow: """ Performs a PUT request against the /system/workflows/{id} endpoint. @@ -80,9 +109,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: Workflow: The parsed response data. """ - return self._parse_one(Workflow, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + Workflow, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Workflow: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Workflow: """ Performs a PATCH request against the /system/workflows/{id} endpoint. @@ -92,4 +125,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: Workflow: The parsed response data. """ - return self._parse_one(Workflow, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + Workflow, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsCountEndpoint.py index a027dc70f..593bbf267 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsIdEventsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/{id}/events/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/{id}/events/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsEndpoint.py index fe5d74b04..bb857d981 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsCountEndpoint import SystemWorkflowsIdEventsCountEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdEndpoint import SystemWorkflowsIdEventsIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsCountEndpoint import ( + SystemWorkflowsIdEventsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdEndpoint import ( + SystemWorkflowsIdEventsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowEvent from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemWorkflowsIdEventsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "events", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemWorkflowsIdEventsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemWorkflowsIdEventsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemWorkflowsIdEventsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowEvent]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowEvent]: """ Performs a GET request against the /system/workflows/{id}/events endpoint. @@ -60,9 +68,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkflowEvent]: The parsed response data. """ - return self._parse_many(WorkflowEvent, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkflowEvent, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowEvent: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowEvent: """ Performs a POST request against the /system/workflows/{id}/events endpoint. @@ -72,4 +84,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkflowEvent: The parsed response data. """ - return self._parse_one(WorkflowEvent, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + WorkflowEvent, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsCountEndpoint.py index 4b077859f..ff57e7d6a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsIdEventsIdActionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/{id}/events/{id}/actions/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/{id}/events/{id}/actions/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsEndpoint.py index 750034cb9..8a60f45da 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdActionsCountEndpoint import \ - SystemWorkflowsIdEventsIdActionsCountEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdActionsIdEndpoint import \ - SystemWorkflowsIdEventsIdActionsIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdActionsCountEndpoint import ( + SystemWorkflowsIdEventsIdActionsCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdActionsIdEndpoint import ( + SystemWorkflowsIdEventsIdActionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowAction from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> SystemWorkflowsIdEventsIdActionsIdEndpoint: Returns: SystemWorkflowsIdEventsIdActionsIdEndpoint: The initialized SystemWorkflowsIdEventsIdActionsIdEndpoint object. """ - child = SystemWorkflowsIdEventsIdActionsIdEndpoint(self.client, parent_endpoint=self) + child = SystemWorkflowsIdEventsIdActionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowAction]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowAction]: """ Performs a GET request against the /system/workflows/{id}/events/{id}/actions endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkflowAction]: The parsed response data. """ - return self._parse_many(WorkflowAction, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkflowAction, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowAction: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowAction: """ Performs a POST request against the /system/workflows/{id}/events/{id}/actions endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkflowAction: The parsed response data. """ - return self._parse_one(WorkflowAction, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + WorkflowAction, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsIdEndpoint.py index c98dc5a3a..5f1be3739 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdActionsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowAction: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowAction: """ Performs a GET request against the /system/workflows/{id}/events/{id}/actions/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkflowAction: The parsed response data. """ - return self._parse_one(WorkflowAction, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkflowAction, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/workflows/{id}/events/{id}/actions/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowAction: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowAction: """ Performs a PUT request against the /system/workflows/{id}/events/{id}/actions/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkflowAction: The parsed response data. """ - return self._parse_one(WorkflowAction, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + WorkflowAction, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowAction: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowAction: """ Performs a PATCH request against the /system/workflows/{id}/events/{id}/actions/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkflowAction: The parsed response data. """ - return self._parse_one(WorkflowAction, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + WorkflowAction, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdCopyEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdCopyEndpoint.py index 9a1c49023..aa3b19b23 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdCopyEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdCopyEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsIdEventsIdCopyEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "copy", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowEvent: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowEvent: """ Performs a POST request against the /system/workflows/{id}/events/{id}/copy endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkflowEvent: The parsed response data. """ - return self._parse_one(WorkflowEvent, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + WorkflowEvent, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdEndpoint.py index 489e3980c..8c8025ba0 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdEventsIdEndpoint.py @@ -1,10 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdActionsEndpoint import \ - SystemWorkflowsIdEventsIdActionsEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdCopyEndpoint import SystemWorkflowsIdEventsIdCopyEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdTestEndpoint import SystemWorkflowsIdEventsIdTestEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdActionsEndpoint import ( + SystemWorkflowsIdEventsIdActionsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdCopyEndpoint import ( + SystemWorkflowsIdEventsIdCopyEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdEventsIdTestEndpoint import ( + SystemWorkflowsIdEventsIdTestEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowEvent from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -14,11 +19,15 @@ class SystemWorkflowsIdEventsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.test = self._register_child_endpoint(SystemWorkflowsIdEventsIdTestEndpoint(client, parent_endpoint=self)) self.actions = self._register_child_endpoint( SystemWorkflowsIdEventsIdActionsEndpoint(client, parent_endpoint=self) ) - self.copy = self._register_child_endpoint(SystemWorkflowsIdEventsIdCopyEndpoint(client, parent_endpoint=self)) + self.test = self._register_child_endpoint( + SystemWorkflowsIdEventsIdTestEndpoint(client, parent_endpoint=self) + ) + self.copy = self._register_child_endpoint( + SystemWorkflowsIdEventsIdCopyEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -43,7 +52,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowEvent: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowEvent: """ Performs a GET request against the /system/workflows/{id}/events/{id} endpoint. @@ -53,9 +64,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkflowEvent: The parsed response data. """ - return self._parse_one(WorkflowEvent, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkflowEvent, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/workflows/{id}/events/{id} endpoint. @@ -65,9 +80,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowEvent: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowEvent: """ Performs a PUT request against the /system/workflows/{id}/events/{id} endpoint. @@ -77,9 +97,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkflowEvent: The parsed response data. """ - return self._parse_one(WorkflowEvent, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + WorkflowEvent, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowEvent: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowEvent: """ Performs a PATCH request against the /system/workflows/{id}/events/{id} endpoint. @@ -89,4 +113,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkflowEvent: The parsed response data. """ - return self._parse_one(WorkflowEvent, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + WorkflowEvent, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesCountEndpoint.py index 052f7eb02..f1507dc4a 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsIdNotifytypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/{id}/notifyTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/{id}/notifyTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesEndpoint.py index 3dff7df4d..d216d8d15 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesEndpoint.py @@ -1,11 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesCountEndpoint import \ - SystemWorkflowsIdNotifytypesCountEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesIdEndpoint import SystemWorkflowsIdNotifytypesIdEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesInfoEndpoint import \ - SystemWorkflowsIdNotifytypesInfoEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesCountEndpoint import ( + SystemWorkflowsIdNotifytypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesIdEndpoint import ( + SystemWorkflowsIdNotifytypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesInfoEndpoint import ( + SystemWorkflowsIdNotifytypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowNotifyType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,12 +19,12 @@ class SystemWorkflowsIdNotifytypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "notifyTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint( - SystemWorkflowsIdNotifytypesInfoEndpoint(client, parent_endpoint=self) - ) self.count = self._register_child_endpoint( SystemWorkflowsIdNotifytypesCountEndpoint(client, parent_endpoint=self) ) + self.info = self._register_child_endpoint( + SystemWorkflowsIdNotifytypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemWorkflowsIdNotifytypesIdEndpoint: """ @@ -31,7 +35,9 @@ def id(self, id: int) -> SystemWorkflowsIdNotifytypesIdEndpoint: Returns: SystemWorkflowsIdNotifytypesIdEndpoint: The initialized SystemWorkflowsIdNotifytypesIdEndpoint object. """ - child = SystemWorkflowsIdNotifytypesIdEndpoint(self.client, parent_endpoint=self) + child = SystemWorkflowsIdNotifytypesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -58,7 +64,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowNotifyType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowNotifyType]: """ Performs a GET request against the /system/workflows/{id}/notifyTypes endpoint. @@ -68,4 +76,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkflowNotifyType]: The parsed response data. """ - return self._parse_many(WorkflowNotifyType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkflowNotifyType, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesIdEndpoint.py index 1f0050667..fe31d5696 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesIdInfoEndpoint import \ - SystemWorkflowsIdNotifytypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesIdInfoEndpoint import ( + SystemWorkflowsIdNotifytypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowNotifyType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowNotifyType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowNotifyType: """ Performs a GET request against the /system/workflows/{id}/notifyTypes/{id} endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkflowNotifyType: The parsed response data. """ - return self._parse_one(WorkflowNotifyType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkflowNotifyType, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesIdInfoEndpoint.py index 16ab57c02..0cbd49718 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowNotifyTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowNotifyTypeInfo: """ Performs a GET request against the /system/workflows/{id}/notifyTypes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkflowNotifyTypeInfo: The parsed response data. """ - return self._parse_one(WorkflowNotifyTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkflowNotifyTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesInfoCountEndpoint.py index 3f9b1eee5..f29b25154 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsIdNotifytypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/{id}/notifyTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/{id}/notifyTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesInfoEndpoint.py index 5b8e13963..9179b47d4 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdNotifyTypesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesInfoCountEndpoint import \ - SystemWorkflowsIdNotifytypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdNotifytypesInfoCountEndpoint import ( + SystemWorkflowsIdNotifytypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowNotifyTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowNotifyTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowNotifyTypeInfo]: """ Performs a GET request against the /system/workflows/{id}/notifyTypes/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkflowNotifyTypeInfo]: The parsed response data. """ - return self._parse_many(WorkflowNotifyTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkflowNotifyTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersCountEndpoint.py index e2dbcde90..e26ebfef1 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsIdTriggersCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/{id}/triggers/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/{id}/triggers/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersEndpoint.py index 5646b0e20..e0f3b3a4b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersCountEndpoint import SystemWorkflowsIdTriggersCountEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersIdEndpoint import SystemWorkflowsIdTriggersIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersCountEndpoint import ( + SystemWorkflowsIdTriggersCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersIdEndpoint import ( + SystemWorkflowsIdTriggersIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowTrigger from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class SystemWorkflowsIdTriggersEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "triggers", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(SystemWorkflowsIdTriggersCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemWorkflowsIdTriggersCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemWorkflowsIdTriggersIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowTrigger]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowTrigger]: """ Performs a GET request against the /system/workflows/{id}/triggers endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkflowTrigger]: The parsed response data. """ - return self._parse_many(WorkflowTrigger, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkflowTrigger, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdEndpoint.py index f930744bc..c55eba50c 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersIdOptionsEndpoint import \ - SystemWorkflowsIdTriggersIdOptionsEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersIdOptionsEndpoint import ( + SystemWorkflowsIdTriggersIdOptionsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdOptionsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdOptionsCountEndpoint.py index d8b2295c9..b6784c2df 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdOptionsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdOptionsCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsIdTriggersIdOptionsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/{id}/triggers/{id}/options/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/{id}/triggers/{id}/options/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdOptionsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdOptionsEndpoint.py index a209de5d6..75965eb60 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdOptionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsIdTriggersIdOptionsEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersIdOptionsCountEndpoint import \ - SystemWorkflowsIdTriggersIdOptionsCountEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsIdTriggersIdOptionsCountEndpoint import ( + SystemWorkflowsIdTriggersIdOptionsCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowTriggerOption from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,7 +14,9 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "options", parent_endpoint=parent_endpoint) self.count = self._register_child_endpoint( - SystemWorkflowsIdTriggersIdOptionsCountEndpoint(client, parent_endpoint=self) + SystemWorkflowsIdTriggersIdOptionsCountEndpoint( + client, parent_endpoint=self + ) ) def paginated( @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowTriggerOption]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowTriggerOption]: """ Performs a GET request against the /system/workflows/{id}/triggers/{id}/options endpoint. @@ -49,4 +54,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkflowTriggerOption]: The parsed response data. """ - return self._parse_many(WorkflowTriggerOption, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkflowTriggerOption, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesCountEndpoint.py index 39b3a4d44..86a8876fc 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsTabletypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/tableTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/tableTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesEndpoint.py index 87e4c97ae..589869763 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesCountEndpoint import SystemWorkflowsTabletypesCountEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesIdEndpoint import SystemWorkflowsTabletypesIdEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesInfoEndpoint import SystemWorkflowsTabletypesInfoEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesCountEndpoint import ( + SystemWorkflowsTabletypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesIdEndpoint import ( + SystemWorkflowsTabletypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesInfoEndpoint import ( + SystemWorkflowsTabletypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowTableType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class SystemWorkflowsTabletypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "tableTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemWorkflowsTabletypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(SystemWorkflowsTabletypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + SystemWorkflowsTabletypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + SystemWorkflowsTabletypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> SystemWorkflowsTabletypesIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowTableType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowTableType]: """ Performs a GET request against the /system/workflows/tableTypes endpoint. @@ -62,4 +74,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkflowTableType]: The parsed response data. """ - return self._parse_many(WorkflowTableType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkflowTableType, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesIdEndpoint.py index 0eb54c620..25ff8c541 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesIdInfoEndpoint import \ - SystemWorkflowsTabletypesIdInfoEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesIdInfoEndpoint import ( + SystemWorkflowsTabletypesIdInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowTableType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +13,9 @@ class SystemWorkflowsTabletypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(SystemWorkflowsTabletypesIdInfoEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + SystemWorkflowsTabletypesIdInfoEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -37,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowTableType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowTableType: """ Performs a GET request against the /system/workflows/tableTypes/{id} endpoint. @@ -47,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkflowTableType: The parsed response data. """ - return self._parse_one(WorkflowTableType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkflowTableType, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesIdInfoEndpoint.py index fb770be10..7c5b29eb3 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowTableTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowTableTypeInfo: """ Performs a GET request against the /system/workflows/tableTypes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkflowTableTypeInfo: The parsed response data. """ - return self._parse_one(WorkflowTableTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkflowTableTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesInfoCountEndpoint.py index d60f6e728..ca32338a7 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsTabletypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /system/workflows/tableTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /system/workflows/tableTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesInfoEndpoint.py index 47fcb5fda..d738a2aac 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsTableTypesInfoEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesInfoCountEndpoint import \ - SystemWorkflowsTabletypesInfoCountEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsTabletypesInfoCountEndpoint import ( + SystemWorkflowsTabletypesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowTableTypeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -39,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowTableTypeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowTableTypeInfo]: """ Performs a GET request against the /system/workflows/tableTypes/info endpoint. @@ -49,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkflowTableTypeInfo]: The parsed response data. """ - return self._parse_many(WorkflowTableTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkflowTableTypeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsActionsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsActionsEndpoint.py index 8df3a8471..36a559575 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsActionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsActionsEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsActionsIdEndpoint import \ - SystemWorkflowsUserdefinedfieldsActionsIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsActionsIdEndpoint import ( + SystemWorkflowsUserdefinedfieldsActionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> SystemWorkflowsUserdefinedfieldsActionsIdEndpoint: Returns: SystemWorkflowsUserdefinedfieldsActionsIdEndpoint: The initialized SystemWorkflowsUserdefinedfieldsActionsIdEndpoint object. """ - child = SystemWorkflowsUserdefinedfieldsActionsIdEndpoint(self.client, parent_endpoint=self) + child = SystemWorkflowsUserdefinedfieldsActionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsActionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsActionsIdEndpoint.py index 9471bdb4e..a1bc5ad9b 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsActionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsActionsIdEndpoint.py @@ -9,7 +9,9 @@ class SystemWorkflowsUserdefinedfieldsActionsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /system/workflows/userdefinedfields/actions/{id} endpoint. @@ -19,4 +21,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEndpoint.py index c68d13678..3e7bdb2b8 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEndpoint.py @@ -1,12 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsActionsEndpoint import \ - SystemWorkflowsUserdefinedfieldsActionsEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEventsEndpoint import \ - SystemWorkflowsUserdefinedfieldsEventsEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsIdEndpoint import \ - SystemWorkflowsUserdefinedfieldsIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsActionsEndpoint import ( + SystemWorkflowsUserdefinedfieldsActionsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEventsEndpoint import ( + SystemWorkflowsUserdefinedfieldsEventsEndpoint, +) +from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsIdEndpoint import ( + SystemWorkflowsUserdefinedfieldsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,12 +18,14 @@ class SystemWorkflowsUserdefinedfieldsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "userdefinedfields", parent_endpoint=parent_endpoint) + self.actions = self._register_child_endpoint( + SystemWorkflowsUserdefinedfieldsActionsEndpoint( + client, parent_endpoint=self + ) + ) self.events = self._register_child_endpoint( SystemWorkflowsUserdefinedfieldsEventsEndpoint(client, parent_endpoint=self) ) - self.actions = self._register_child_endpoint( - SystemWorkflowsUserdefinedfieldsActionsEndpoint(client, parent_endpoint=self) - ) def id(self, id: int) -> SystemWorkflowsUserdefinedfieldsIdEndpoint: """ @@ -31,6 +36,8 @@ def id(self, id: int) -> SystemWorkflowsUserdefinedfieldsIdEndpoint: Returns: SystemWorkflowsUserdefinedfieldsIdEndpoint: The initialized SystemWorkflowsUserdefinedfieldsIdEndpoint object. """ - child = SystemWorkflowsUserdefinedfieldsIdEndpoint(self.client, parent_endpoint=self) + child = SystemWorkflowsUserdefinedfieldsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsEndpoint.py index 4133b07a5..cc65acab2 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEventsIdEndpoint import \ - SystemWorkflowsUserdefinedfieldsEventsIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEventsIdEndpoint import ( + SystemWorkflowsUserdefinedfieldsEventsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> SystemWorkflowsUserdefinedfieldsEventsIdEndpoint: Returns: SystemWorkflowsUserdefinedfieldsEventsIdEndpoint: The initialized SystemWorkflowsUserdefinedfieldsEventsIdEndpoint object. """ - child = SystemWorkflowsUserdefinedfieldsEventsIdEndpoint(self.client, parent_endpoint=self) + child = SystemWorkflowsUserdefinedfieldsEventsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint.py index e3d8f1379..d46449b79 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint import \ - SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint import ( + SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -20,6 +21,8 @@ def id(self, id: int) -> SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoi Returns: SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint: The initialized SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint object. """ - child = SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint(self.client, parent_endpoint=self) + child = SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint.py index a36192082..8efe5ab0e 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdActionsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkflowActionUserDefinedField]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkflowActionUserDefinedField]: """ Performs a GET request against the /system/workflows/userdefinedfields/events/{id}/actions/{id} endpoint. @@ -44,5 +46,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l list[WorkflowActionUserDefinedField]: The parsed response data. """ return self._parse_many( - WorkflowActionUserDefinedField, super()._make_request("GET", data=data, params=params).json() + WorkflowActionUserDefinedField, + super()._make_request("GET", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdEndpoint.py index 890ad32e0..64aa0a775 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsEventsIdEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint import \ - SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint +from pyconnectwise.endpoints.manage.SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint import ( + SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkflowActionUserDefinedField from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,10 +14,14 @@ def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) self.actions = self._register_child_endpoint( - SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint(client, parent_endpoint=self) + SystemWorkflowsUserdefinedfieldsEventsIdActionsEndpoint( + client, parent_endpoint=self + ) ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionUserDefinedField: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowActionUserDefinedField: """ Performs a POST request against the /system/workflows/userdefinedfields/events/{id} endpoint. @@ -27,5 +32,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionUserDefinedField: The parsed response data. """ return self._parse_one( - WorkflowActionUserDefinedField, super()._make_request("POST", data=data, params=params).json() + WorkflowActionUserDefinedField, + super()._make_request("POST", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsIdEndpoint.py index bd4b3ae77..e0d116f14 100644 --- a/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/SystemWorkflowsUserdefinedfieldsIdEndpoint.py @@ -10,7 +10,9 @@ class SystemWorkflowsUserdefinedfieldsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionUserDefinedField: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowActionUserDefinedField: """ Performs a PUT request against the /system/workflows/userdefinedfields/{id} endpoint. @@ -21,10 +23,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W WorkflowActionUserDefinedField: The parsed response data. """ return self._parse_one( - WorkflowActionUserDefinedField, super()._make_request("PUT", data=data, params=params).json() + WorkflowActionUserDefinedField, + super()._make_request("PUT", data=data, params=params).json(), ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionUserDefinedField: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkflowActionUserDefinedField: """ Performs a PATCH request against the /system/workflows/userdefinedfields/{id} endpoint. @@ -35,5 +40,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkflowActionUserDefinedField: The parsed response data. """ return self._parse_one( - WorkflowActionUserDefinedField, super()._make_request("PATCH", data=data, params=params).json() + WorkflowActionUserDefinedField, + super()._make_request("PATCH", data=data, params=params).json(), ) diff --git a/src/pyconnectwise/endpoints/manage/TimeAccrualsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeAccrualsCountEndpoint.py index 7c39105e7..88d6e43e8 100644 --- a/src/pyconnectwise/endpoints/manage/TimeAccrualsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeAccrualsCountEndpoint.py @@ -10,7 +10,9 @@ class TimeAccrualsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/accruals/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/accruals/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeAccrualsEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeAccrualsEndpoint.py index 27afa0963..d1b66e011 100644 --- a/src/pyconnectwise/endpoints/manage/TimeAccrualsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeAccrualsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeAccrualsCountEndpoint import TimeAccrualsCountEndpoint +from pyconnectwise.endpoints.manage.TimeAccrualsCountEndpoint import ( + TimeAccrualsCountEndpoint, +) from pyconnectwise.endpoints.manage.TimeAccrualsIdEndpoint import TimeAccrualsIdEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeAccrual @@ -12,7 +14,9 @@ class TimeAccrualsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "accruals", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeAccrualsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeAccrualsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeAccrualsIdEndpoint: """ @@ -27,7 +31,9 @@ def id(self, id: int) -> TimeAccrualsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimeAccrual]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimeAccrual]: """ Performs a GET request against the /time/accruals endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +54,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeAccrual]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeAccrual]: """ Performs a GET request against the /time/accruals endpoint. @@ -58,9 +66,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeAccrual]: The parsed response data. """ - return self._parse_many(TimeAccrual, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeAccrual, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeAccrual: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeAccrual: """ Performs a POST request against the /time/accruals endpoint. @@ -70,4 +82,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimeAccrual: The parsed response data. """ - return self._parse_one(TimeAccrual, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TimeAccrual, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsCountEndpoint.py index 6c9628402..36381133d 100644 --- a/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsCountEndpoint.py @@ -10,7 +10,9 @@ class TimeAccrualsIdDetailsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/accruals/{id}/details/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/accruals/{id}/details/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsEndpoint.py index 22aa8e46b..4359845cd 100644 --- a/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeAccrualsIdDetailsCountEndpoint import TimeAccrualsIdDetailsCountEndpoint -from pyconnectwise.endpoints.manage.TimeAccrualsIdDetailsIdEndpoint import TimeAccrualsIdDetailsIdEndpoint +from pyconnectwise.endpoints.manage.TimeAccrualsIdDetailsCountEndpoint import ( + TimeAccrualsIdDetailsCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeAccrualsIdDetailsIdEndpoint import ( + TimeAccrualsIdDetailsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeAccrualDetail from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class TimeAccrualsIdDetailsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "details", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeAccrualsIdDetailsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeAccrualsIdDetailsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeAccrualsIdDetailsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeAccrualDetail]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeAccrualDetail]: """ Performs a GET request against the /time/accruals/{id}/details endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeAccrualDetail]: The parsed response data. """ - return self._parse_many(TimeAccrualDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeAccrualDetail, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsIdEndpoint.py index 0e18bce4e..2f67c93ae 100644 --- a/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeAccrualsIdDetailsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeAccrualDetail: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeAccrualDetail: """ Performs a GET request against the /time/accruals/{id}/details/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeAccrualDetail: The parsed response data. """ - return self._parse_one(TimeAccrualDetail, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimeAccrualDetail, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/accruals/{id}/details/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeAccrualDetail: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeAccrualDetail: """ Performs a PUT request against the /time/accruals/{id}/details/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeAccrualDetail: The parsed response data. """ - return self._parse_one(TimeAccrualDetail, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TimeAccrualDetail, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeAccrualDetail: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeAccrualDetail: """ Performs a PATCH request against the /time/accruals/{id}/details/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimeAccrualDetail: The parsed response data. """ - return self._parse_one(TimeAccrualDetail, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TimeAccrualDetail, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeAccrualsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeAccrualsIdEndpoint.py index 194cfb486..6cc0e37ff 100644 --- a/src/pyconnectwise/endpoints/manage/TimeAccrualsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeAccrualsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeAccrualsIdDetailsEndpoint import TimeAccrualsIdDetailsEndpoint +from pyconnectwise.endpoints.manage.TimeAccrualsIdDetailsEndpoint import ( + TimeAccrualsIdDetailsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeAccrual from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class TimeAccrualsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.details = self._register_child_endpoint(TimeAccrualsIdDetailsEndpoint(client, parent_endpoint=self)) + self.details = self._register_child_endpoint( + TimeAccrualsIdDetailsEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimeAccrual]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimeAccrual]: """ Performs a GET request against the /time/accruals/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeAccrual: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeAccrual: """ Performs a GET request against the /time/accruals/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeAccrual: The parsed response data. """ - return self._parse_one(TimeAccrual, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimeAccrual, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/accruals/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeAccrual: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeAccrual: """ Performs a PUT request against the /time/accruals/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeAccrual: The parsed response data. """ - return self._parse_one(TimeAccrual, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TimeAccrual, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeAccrual: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeAccrual: """ Performs a PATCH request against the /time/accruals/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimeAccrual: The parsed response data. """ - return self._parse_one(TimeAccrual, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TimeAccrual, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesCountEndpoint.py index 18f26f9c7..ee8e1f77d 100644 --- a/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesCountEndpoint.py @@ -10,7 +10,9 @@ class TimeActivitystopwatchesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/activitystopwatches/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/activitystopwatches/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesEndpoint.py index c321d286b..f4030e52e 100644 --- a/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeActivitystopwatchesCountEndpoint import TimeActivitystopwatchesCountEndpoint -from pyconnectwise.endpoints.manage.TimeActivitystopwatchesIdEndpoint import TimeActivitystopwatchesIdEndpoint +from pyconnectwise.endpoints.manage.TimeActivitystopwatchesCountEndpoint import ( + TimeActivitystopwatchesCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeActivitystopwatchesIdEndpoint import ( + TimeActivitystopwatchesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ActivityStopwatch from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class TimeActivitystopwatchesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "activitystopwatches", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeActivitystopwatchesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeActivitystopwatchesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeActivitystopwatchesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ActivityStopwatch]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ActivityStopwatch]: """ Performs a GET request against the /time/activitystopwatches endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ActivityStopwatch]: The parsed response data. """ - return self._parse_many(ActivityStopwatch, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ActivityStopwatch, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityStopwatch: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityStopwatch: """ Performs a POST request against the /time/activitystopwatches endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ActivityStopwatch: The parsed response data. """ - return self._parse_one(ActivityStopwatch, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ActivityStopwatch, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesIdEndpoint.py index 2649d3629..c3f391af8 100644 --- a/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeActivitystopwatchesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityStopwatch: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityStopwatch: """ Performs a GET request against the /time/activitystopwatches/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ActivityStopwatch: The parsed response data. """ - return self._parse_one(ActivityStopwatch, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ActivityStopwatch, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/activitystopwatches/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityStopwatch: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityStopwatch: """ Performs a PUT request against the /time/activitystopwatches/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> A Returns: ActivityStopwatch: The parsed response data. """ - return self._parse_one(ActivityStopwatch, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ActivityStopwatch, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ActivityStopwatch: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ActivityStopwatch: """ Performs a PATCH request against the /time/activitystopwatches/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ActivityStopwatch: The parsed response data. """ - return self._parse_one(ActivityStopwatch, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ActivityStopwatch, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesCountEndpoint.py index bc31751d8..37504f9d1 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesCountEndpoint.py @@ -10,7 +10,9 @@ class TimeChargecodesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/chargeCodes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/chargeCodes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesEndpoint.py index 1f5be5b18..2e7415be5 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesCountEndpoint import TimeChargecodesCountEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesIdEndpoint import TimeChargecodesIdEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesInfoEndpoint import TimeChargecodesInfoEndpoint +from pyconnectwise.endpoints.manage.TimeChargecodesCountEndpoint import ( + TimeChargecodesCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeChargecodesIdEndpoint import ( + TimeChargecodesIdEndpoint, +) +from pyconnectwise.endpoints.manage.TimeChargecodesInfoEndpoint import ( + TimeChargecodesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ChargeCode from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class TimeChargecodesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "chargeCodes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(TimeChargecodesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(TimeChargecodesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeChargecodesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + TimeChargecodesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeChargecodesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> TimeChargecodesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ChargeCode]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ChargeCode]: """ Performs a GET request against the /time/chargeCodes endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ChargeCode]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ChargeCode]: """ Performs a GET request against the /time/chargeCodes endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ChargeCode]: The parsed response data. """ - return self._parse_many(ChargeCode, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ChargeCode, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ChargeCode: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ChargeCode: """ Performs a POST request against the /time/chargeCodes endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ChargeCode: The parsed response data. """ - return self._parse_one(ChargeCode, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ChargeCode, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdEndpoint.py index 10163378a..a2738a296 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesIdExpensetypesEndpoint import TimeChargecodesIdExpensetypesEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesIdInfoEndpoint import TimeChargecodesIdInfoEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesIdUsagesEndpoint import TimeChargecodesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.TimeChargecodesIdExpensetypesEndpoint import ( + TimeChargecodesIdExpensetypesEndpoint, +) +from pyconnectwise.endpoints.manage.TimeChargecodesIdInfoEndpoint import ( + TimeChargecodesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.TimeChargecodesIdUsagesEndpoint import ( + TimeChargecodesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ChargeCode from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,13 +19,19 @@ class TimeChargecodesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(TimeChargecodesIdInfoEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + TimeChargecodesIdUsagesEndpoint(client, parent_endpoint=self) + ) self.expense_types = self._register_child_endpoint( TimeChargecodesIdExpensetypesEndpoint(client, parent_endpoint=self) ) - self.usages = self._register_child_endpoint(TimeChargecodesIdUsagesEndpoint(client, parent_endpoint=self)) + self.info = self._register_child_endpoint( + TimeChargecodesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[ChargeCode]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[ChargeCode]: """ Performs a GET request against the /time/chargeCodes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -40,7 +52,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ChargeCode: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ChargeCode: """ Performs a GET request against the /time/chargeCodes/{id} endpoint. @@ -50,9 +64,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ChargeCode: The parsed response data. """ - return self._parse_one(ChargeCode, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ChargeCode, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/chargeCodes/{id} endpoint. @@ -62,9 +80,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ChargeCode: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ChargeCode: """ Performs a PUT request against the /time/chargeCodes/{id} endpoint. @@ -74,9 +97,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ChargeCode: The parsed response data. """ - return self._parse_one(ChargeCode, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ChargeCode, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ChargeCode: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ChargeCode: """ Performs a PATCH request against the /time/chargeCodes/{id} endpoint. @@ -86,4 +113,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ChargeCode: The parsed response data. """ - return self._parse_one(ChargeCode, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ChargeCode, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesCountEndpoint.py index 096a46821..03ca35acd 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesCountEndpoint.py @@ -10,7 +10,9 @@ class TimeChargecodesIdExpensetypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/chargeCodes/{id}/expenseTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/chargeCodes/{id}/expenseTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesEndpoint.py index 8a5c3104e..a4bf15c93 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesIdExpensetypesCountEndpoint import \ - TimeChargecodesIdExpensetypesCountEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesIdExpensetypesIdEndpoint import \ - TimeChargecodesIdExpensetypesIdEndpoint +from pyconnectwise.endpoints.manage.TimeChargecodesIdExpensetypesCountEndpoint import ( + TimeChargecodesIdExpensetypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeChargecodesIdExpensetypesIdEndpoint import ( + TimeChargecodesIdExpensetypesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ChargeCodeExpenseType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,7 +29,9 @@ def id(self, id: int) -> TimeChargecodesIdExpensetypesIdEndpoint: Returns: TimeChargecodesIdExpensetypesIdEndpoint: The initialized TimeChargecodesIdExpensetypesIdEndpoint object. """ - child = TimeChargecodesIdExpensetypesIdEndpoint(self.client, parent_endpoint=self) + child = TimeChargecodesIdExpensetypesIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child @@ -54,7 +58,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ChargeCodeExpenseType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ChargeCodeExpenseType]: """ Performs a GET request against the /time/chargeCodes/{id}/expenseTypes endpoint. @@ -64,9 +70,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ChargeCodeExpenseType]: The parsed response data. """ - return self._parse_many(ChargeCodeExpenseType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ChargeCodeExpenseType, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ChargeCodeExpenseType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ChargeCodeExpenseType: """ Performs a POST request against the /time/chargeCodes/{id}/expenseTypes endpoint. @@ -76,4 +87,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ChargeCodeExpenseType: The parsed response data. """ - return self._parse_one(ChargeCodeExpenseType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ChargeCodeExpenseType, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesIdEndpoint.py index 34ecad432..c9e50b02e 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdExpenseTypesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ChargeCodeExpenseType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ChargeCodeExpenseType: """ Performs a GET request against the /time/chargeCodes/{id}/expenseTypes/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ChargeCodeExpenseType: The parsed response data. """ - return self._parse_one(ChargeCodeExpenseType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ChargeCodeExpenseType, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/chargeCodes/{id}/expenseTypes/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ChargeCodeExpenseType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ChargeCodeExpenseType: """ Performs a PUT request against the /time/chargeCodes/{id}/expenseTypes/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ChargeCodeExpenseType: The parsed response data. """ - return self._parse_one(ChargeCodeExpenseType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ChargeCodeExpenseType, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ChargeCodeExpenseType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ChargeCodeExpenseType: """ Performs a PATCH request against the /time/chargeCodes/{id}/expenseTypes/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ChargeCodeExpenseType: The parsed response data. """ - return self._parse_one(ChargeCodeExpenseType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ChargeCodeExpenseType, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdInfoEndpoint.py index f33d60d3a..8637a1278 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ChargeCodeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ChargeCodeInfo: """ Performs a GET request against the /time/chargeCodes/{id}/info endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: ChargeCodeInfo: The parsed response data. """ - return self._parse_one(ChargeCodeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ChargeCodeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdUsagesEndpoint.py index a30cf7506..c8cf3c13c 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesIdUsagesListEndpoint import TimeChargecodesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.TimeChargecodesIdUsagesListEndpoint import ( + TimeChargecodesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class TimeChargecodesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(TimeChargecodesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + TimeChargecodesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /time/chargeCodes/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /time/chargeCodes/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdUsagesListEndpoint.py index 502fde81c..980a4b56c 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class TimeChargecodesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /time/chargeCodes/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /time/chargeCodes/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesInfoCountEndpoint.py index 30fb5fbf6..cb0f4c78c 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class TimeChargecodesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/chargeCodes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/chargeCodes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeChargeCodesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeChargeCodesInfoEndpoint.py index 2d304cd3a..dc9966be2 100644 --- a/src/pyconnectwise/endpoints/manage/TimeChargeCodesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeChargeCodesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesInfoCountEndpoint import TimeChargecodesInfoCountEndpoint +from pyconnectwise.endpoints.manage.TimeChargecodesInfoCountEndpoint import ( + TimeChargecodesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ChargeCodeInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class TimeChargecodesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeChargecodesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeChargecodesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ChargeCodeInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ChargeCodeInfo]: """ Performs a GET request against the /time/chargeCodes/info endpoint. @@ -46,4 +52,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ChargeCodeInfo]: The parsed response data. """ - return self._parse_many(ChargeCodeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ChargeCodeInfo, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeEndpoint.py index 97f56b7a3..b94e0bf9a 100644 --- a/src/pyconnectwise/endpoints/manage/TimeEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeEndpoint.py @@ -2,14 +2,24 @@ from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint from pyconnectwise.endpoints.manage.TimeAccrualsEndpoint import TimeAccrualsEndpoint -from pyconnectwise.endpoints.manage.TimeActivitystopwatchesEndpoint import TimeActivitystopwatchesEndpoint -from pyconnectwise.endpoints.manage.TimeChargecodesEndpoint import TimeChargecodesEndpoint +from pyconnectwise.endpoints.manage.TimeActivitystopwatchesEndpoint import ( + TimeActivitystopwatchesEndpoint, +) +from pyconnectwise.endpoints.manage.TimeChargecodesEndpoint import ( + TimeChargecodesEndpoint, +) from pyconnectwise.endpoints.manage.TimeEntriesEndpoint import TimeEntriesEndpoint from pyconnectwise.endpoints.manage.TimeInfoEndpoint import TimeInfoEndpoint -from pyconnectwise.endpoints.manage.TimeSchedulestopwatchesEndpoint import TimeSchedulestopwatchesEndpoint +from pyconnectwise.endpoints.manage.TimeSchedulestopwatchesEndpoint import ( + TimeSchedulestopwatchesEndpoint, +) from pyconnectwise.endpoints.manage.TimeSheetsEndpoint import TimeSheetsEndpoint -from pyconnectwise.endpoints.manage.TimeTicketstopwatchesEndpoint import TimeTicketstopwatchesEndpoint -from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsEndpoint import TimeTimeperiodsetupsEndpoint +from pyconnectwise.endpoints.manage.TimeTicketstopwatchesEndpoint import ( + TimeTicketstopwatchesEndpoint, +) +from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsEndpoint import ( + TimeTimeperiodsetupsEndpoint, +) from pyconnectwise.endpoints.manage.TimeWorkrolesEndpoint import TimeWorkrolesEndpoint from pyconnectwise.endpoints.manage.TimeWorktypesEndpoint import TimeWorktypesEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel @@ -20,22 +30,36 @@ class TimeEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "time", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(TimeInfoEndpoint(client, parent_endpoint=self)) - self.entries = self._register_child_endpoint(TimeEntriesEndpoint(client, parent_endpoint=self)) - self.work_roles = self._register_child_endpoint(TimeWorkrolesEndpoint(client, parent_endpoint=self)) - self.time_period_setups = self._register_child_endpoint( - TimeTimeperiodsetupsEndpoint(client, parent_endpoint=self) + self.info = self._register_child_endpoint( + TimeInfoEndpoint(client, parent_endpoint=self) ) - self.activitystopwatches = self._register_child_endpoint( - TimeActivitystopwatchesEndpoint(client, parent_endpoint=self) + self.accruals = self._register_child_endpoint( + TimeAccrualsEndpoint(client, parent_endpoint=self) ) self.schedulestopwatches = self._register_child_endpoint( TimeSchedulestopwatchesEndpoint(client, parent_endpoint=self) ) - self.charge_codes = self._register_child_endpoint(TimeChargecodesEndpoint(client, parent_endpoint=self)) + self.entries = self._register_child_endpoint( + TimeEntriesEndpoint(client, parent_endpoint=self) + ) + self.charge_codes = self._register_child_endpoint( + TimeChargecodesEndpoint(client, parent_endpoint=self) + ) self.ticketstopwatches = self._register_child_endpoint( TimeTicketstopwatchesEndpoint(client, parent_endpoint=self) ) - self.accruals = self._register_child_endpoint(TimeAccrualsEndpoint(client, parent_endpoint=self)) - self.work_types = self._register_child_endpoint(TimeWorktypesEndpoint(client, parent_endpoint=self)) - self.sheets = self._register_child_endpoint(TimeSheetsEndpoint(client, parent_endpoint=self)) + self.time_period_setups = self._register_child_endpoint( + TimeTimeperiodsetupsEndpoint(client, parent_endpoint=self) + ) + self.work_roles = self._register_child_endpoint( + TimeWorkrolesEndpoint(client, parent_endpoint=self) + ) + self.activitystopwatches = self._register_child_endpoint( + TimeActivitystopwatchesEndpoint(client, parent_endpoint=self) + ) + self.work_types = self._register_child_endpoint( + TimeWorktypesEndpoint(client, parent_endpoint=self) + ) + self.sheets = self._register_child_endpoint( + TimeSheetsEndpoint(client, parent_endpoint=self) + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeEntriesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeEntriesCountEndpoint.py index 77c37042e..6246d4848 100644 --- a/src/pyconnectwise/endpoints/manage/TimeEntriesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeEntriesCountEndpoint.py @@ -10,7 +10,9 @@ class TimeEntriesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/entries/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/entries/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeEntriesDefaultsEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeEntriesDefaultsEndpoint.py index a00ae337f..559f6c9c8 100644 --- a/src/pyconnectwise/endpoints/manage/TimeEntriesDefaultsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeEntriesDefaultsEndpoint.py @@ -10,7 +10,9 @@ class TimeEntriesDefaultsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "defaults", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeEntry: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeEntry: """ Performs a POST request against the /time/entries/defaults endpoint. @@ -20,4 +22,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimeEntry: The parsed response data. """ - return self._parse_one(TimeEntry, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TimeEntry, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeEntriesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeEntriesEndpoint.py index ed3850359..4bd43a28a 100644 --- a/src/pyconnectwise/endpoints/manage/TimeEntriesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeEntriesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeEntriesCountEndpoint import TimeEntriesCountEndpoint -from pyconnectwise.endpoints.manage.TimeEntriesDefaultsEndpoint import TimeEntriesDefaultsEndpoint +from pyconnectwise.endpoints.manage.TimeEntriesCountEndpoint import ( + TimeEntriesCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeEntriesDefaultsEndpoint import ( + TimeEntriesDefaultsEndpoint, +) from pyconnectwise.endpoints.manage.TimeEntriesIdEndpoint import TimeEntriesIdEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeEntry @@ -13,8 +17,12 @@ class TimeEntriesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "entries", parent_endpoint=parent_endpoint) - self.defaults = self._register_child_endpoint(TimeEntriesDefaultsEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(TimeEntriesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeEntriesCountEndpoint(client, parent_endpoint=self) + ) + self.defaults = self._register_child_endpoint( + TimeEntriesDefaultsEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeEntriesIdEndpoint: """ @@ -29,7 +37,9 @@ def id(self, id: int) -> TimeEntriesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimeEntry]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimeEntry]: """ Performs a GET request against the /time/entries endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +60,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeEntry]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeEntry]: """ Performs a GET request against the /time/entries endpoint. @@ -60,9 +72,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeEntry]: The parsed response data. """ - return self._parse_many(TimeEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeEntry, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeEntry: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeEntry: """ Performs a POST request against the /time/entries endpoint. @@ -72,4 +88,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimeEntry: The parsed response data. """ - return self._parse_one(TimeEntry, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TimeEntry, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsCountEndpoint.py index 2a1547d32..7d9501fc7 100644 --- a/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsCountEndpoint.py @@ -10,7 +10,9 @@ class TimeEntriesIdAuditsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/entries/{id}/audits/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/entries/{id}/audits/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsEndpoint.py index ea7b50faa..23d4309a6 100644 --- a/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeEntriesIdAuditsCountEndpoint import TimeEntriesIdAuditsCountEndpoint -from pyconnectwise.endpoints.manage.TimeEntriesIdAuditsIdEndpoint import TimeEntriesIdAuditsIdEndpoint +from pyconnectwise.endpoints.manage.TimeEntriesIdAuditsCountEndpoint import ( + TimeEntriesIdAuditsCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeEntriesIdAuditsIdEndpoint import ( + TimeEntriesIdAuditsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeEntryAudit from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class TimeEntriesIdAuditsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "audits", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeEntriesIdAuditsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeEntriesIdAuditsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeEntriesIdAuditsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeEntryAudit]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeEntryAudit]: """ Performs a GET request against the /time/entries/{id}/audits endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeEntryAudit]: The parsed response data. """ - return self._parse_many(TimeEntryAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeEntryAudit, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsIdEndpoint.py index a26769e86..f4e17db16 100644 --- a/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeEntriesIdAuditsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeEntryAudit: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeEntryAudit: """ Performs a GET request against the /time/entries/{id}/audits/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeEntryAudit: The parsed response data. """ - return self._parse_one(TimeEntryAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimeEntryAudit, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeEntriesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeEntriesIdEndpoint.py index 6e9800ef3..68437e763 100644 --- a/src/pyconnectwise/endpoints/manage/TimeEntriesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeEntriesIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeEntriesIdAuditsEndpoint import TimeEntriesIdAuditsEndpoint +from pyconnectwise.endpoints.manage.TimeEntriesIdAuditsEndpoint import ( + TimeEntriesIdAuditsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeEntry from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class TimeEntriesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.audits = self._register_child_endpoint(TimeEntriesIdAuditsEndpoint(client, parent_endpoint=self)) + self.audits = self._register_child_endpoint( + TimeEntriesIdAuditsEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimeEntry]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimeEntry]: """ Performs a GET request against the /time/entries/{id} endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeEntry: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeEntry: """ Performs a GET request against the /time/entries/{id} endpoint. @@ -44,9 +52,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeEntry: The parsed response data. """ - return self._parse_one(TimeEntry, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimeEntry, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/entries/{id} endpoint. @@ -56,9 +68,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeEntry: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeEntry: """ Performs a PUT request against the /time/entries/{id} endpoint. @@ -68,9 +85,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeEntry: The parsed response data. """ - return self._parse_one(TimeEntry, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TimeEntry, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeEntry: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeEntry: """ Performs a PATCH request against the /time/entries/{id} endpoint. @@ -80,4 +101,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimeEntry: The parsed response data. """ - return self._parse_one(TimeEntry, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TimeEntry, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeInfoChargeCodeExpenseTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeInfoChargeCodeExpenseTypesCountEndpoint.py index 5cffa01e5..dde086229 100644 --- a/src/pyconnectwise/endpoints/manage/TimeInfoChargeCodeExpenseTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeInfoChargeCodeExpenseTypesCountEndpoint.py @@ -10,7 +10,9 @@ class TimeInfoChargecodeexpensetypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/info/chargeCodeExpenseTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/info/chargeCodeExpenseTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeInfoChargeCodeExpenseTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeInfoChargeCodeExpenseTypesEndpoint.py index 25b17b357..0ffa8a0a2 100644 --- a/src/pyconnectwise/endpoints/manage/TimeInfoChargeCodeExpenseTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeInfoChargeCodeExpenseTypesEndpoint.py @@ -1,8 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeInfoChargecodeexpensetypesCountEndpoint import \ - TimeInfoChargecodeexpensetypesCountEndpoint +from pyconnectwise.endpoints.manage.TimeInfoChargecodeexpensetypesCountEndpoint import ( + TimeInfoChargecodeexpensetypesCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ChargeCodeExpenseType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -10,7 +11,9 @@ class TimeInfoChargecodeexpensetypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): - super().__init__(client, "chargeCodeExpenseTypes", parent_endpoint=parent_endpoint) + super().__init__( + client, "chargeCodeExpenseTypes", parent_endpoint=parent_endpoint + ) self.count = self._register_child_endpoint( TimeInfoChargecodeexpensetypesCountEndpoint(client, parent_endpoint=self) @@ -39,7 +42,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ChargeCodeExpenseType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ChargeCodeExpenseType]: """ Performs a GET request against the /time/info/chargeCodeExpenseTypes endpoint. @@ -49,4 +54,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ChargeCodeExpenseType]: The parsed response data. """ - return self._parse_many(ChargeCodeExpenseType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ChargeCodeExpenseType, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeInfoEndpoint.py index 6a0398146..da13a5298 100644 --- a/src/pyconnectwise/endpoints/manage/TimeInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeInfoChargecodeexpensetypesEndpoint import TimeInfoChargecodeexpensetypesEndpoint +from pyconnectwise.endpoints.manage.TimeInfoChargecodeexpensetypesEndpoint import ( + TimeInfoChargecodeexpensetypesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.responses.paginated_response import PaginatedResponse diff --git a/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesCountEndpoint.py index 5db81272a..81f34f429 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesCountEndpoint.py @@ -10,7 +10,9 @@ class TimeSchedulestopwatchesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/schedulestopwatches/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/schedulestopwatches/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesEndpoint.py index fd044062a..7b9f44e11 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeSchedulestopwatchesCountEndpoint import TimeSchedulestopwatchesCountEndpoint -from pyconnectwise.endpoints.manage.TimeSchedulestopwatchesIdEndpoint import TimeSchedulestopwatchesIdEndpoint +from pyconnectwise.endpoints.manage.TimeSchedulestopwatchesCountEndpoint import ( + TimeSchedulestopwatchesCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeSchedulestopwatchesIdEndpoint import ( + TimeSchedulestopwatchesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import ScheduleStopwatch from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class TimeSchedulestopwatchesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "schedulestopwatches", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeSchedulestopwatchesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeSchedulestopwatchesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeSchedulestopwatchesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[ScheduleStopwatch]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[ScheduleStopwatch]: """ Performs a GET request against the /time/schedulestopwatches endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[ScheduleStopwatch]: The parsed response data. """ - return self._parse_many(ScheduleStopwatch, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + ScheduleStopwatch, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleStopwatch: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleStopwatch: """ Performs a POST request against the /time/schedulestopwatches endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleStopwatch: The parsed response data. """ - return self._parse_one(ScheduleStopwatch, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + ScheduleStopwatch, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesIdEndpoint.py index 3d4a53b07..1445e3c5f 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSchedulestopwatchesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleStopwatch: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleStopwatch: """ Performs a GET request against the /time/schedulestopwatches/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleStopwatch: The parsed response data. """ - return self._parse_one(ScheduleStopwatch, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + ScheduleStopwatch, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/schedulestopwatches/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleStopwatch: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleStopwatch: """ Performs a PUT request against the /time/schedulestopwatches/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> S Returns: ScheduleStopwatch: The parsed response data. """ - return self._parse_one(ScheduleStopwatch, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + ScheduleStopwatch, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> ScheduleStopwatch: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> ScheduleStopwatch: """ Performs a PATCH request against the /time/schedulestopwatches/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: ScheduleStopwatch: The parsed response data. """ - return self._parse_one(ScheduleStopwatch, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + ScheduleStopwatch, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsCountEndpoint.py index 52eb9a69f..3c20348bd 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsCountEndpoint.py @@ -10,7 +10,9 @@ class TimeSheetsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/sheets/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/sheets/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsEndpoint.py index bc9757273..0d3e724ad 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeSheetsCountEndpoint import TimeSheetsCountEndpoint +from pyconnectwise.endpoints.manage.TimeSheetsCountEndpoint import ( + TimeSheetsCountEndpoint, +) from pyconnectwise.endpoints.manage.TimeSheetsIdEndpoint import TimeSheetsIdEndpoint from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeSheet @@ -12,7 +14,9 @@ class TimeSheetsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "sheets", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeSheetsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeSheetsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeSheetsIdEndpoint: """ @@ -27,7 +31,9 @@ def id(self, id: int) -> TimeSheetsIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimeSheet]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimeSheet]: """ Performs a GET request against the /time/sheets endpoint and returns an initialized PaginatedResponse object. @@ -48,7 +54,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeSheet]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeSheet]: """ Performs a GET request against the /time/sheets endpoint. @@ -58,4 +66,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeSheet]: The parsed response data. """ - return self._parse_many(TimeSheet, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeSheet, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsIdApproveEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsIdApproveEndpoint.py index 496b796a5..1b3743d7c 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsIdApproveEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsIdApproveEndpoint.py @@ -10,7 +10,9 @@ class TimeSheetsIdApproveEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "approve", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /time/sheets/{id}/approve endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsCountEndpoint.py index 993128ba9..9e364f6c1 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsCountEndpoint.py @@ -10,7 +10,9 @@ class TimeSheetsIdAuditsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/sheets/{id}/audits/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/sheets/{id}/audits/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsEndpoint.py index 8468ee2e0..7d67c6733 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeSheetsIdAuditsCountEndpoint import TimeSheetsIdAuditsCountEndpoint -from pyconnectwise.endpoints.manage.TimeSheetsIdAuditsIdEndpoint import TimeSheetsIdAuditsIdEndpoint +from pyconnectwise.endpoints.manage.TimeSheetsIdAuditsCountEndpoint import ( + TimeSheetsIdAuditsCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeSheetsIdAuditsIdEndpoint import ( + TimeSheetsIdAuditsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeSheetAudit from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class TimeSheetsIdAuditsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "audits", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeSheetsIdAuditsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeSheetsIdAuditsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeSheetsIdAuditsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimeSheetAudit]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimeSheetAudit]: """ Performs a GET request against the /time/sheets/{id}/audits endpoint. @@ -60,4 +68,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimeSheetAudit]: The parsed response data. """ - return self._parse_many(TimeSheetAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimeSheetAudit, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsIdEndpoint.py index 228b8fe38..b3362c6e1 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsIdAuditsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeSheetAudit: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeSheetAudit: """ Performs a GET request against the /time/sheets/{id}/audits/{id} endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeSheetAudit: The parsed response data. """ - return self._parse_one(TimeSheetAudit, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimeSheetAudit, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsIdEndpoint.py index 35d68932f..d46524800 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsIdEndpoint.py @@ -1,11 +1,21 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeSheetsIdApproveEndpoint import TimeSheetsIdApproveEndpoint -from pyconnectwise.endpoints.manage.TimeSheetsIdAuditsEndpoint import TimeSheetsIdAuditsEndpoint -from pyconnectwise.endpoints.manage.TimeSheetsIdRejectEndpoint import TimeSheetsIdRejectEndpoint -from pyconnectwise.endpoints.manage.TimeSheetsIdReverseEndpoint import TimeSheetsIdReverseEndpoint -from pyconnectwise.endpoints.manage.TimeSheetsIdSubmitEndpoint import TimeSheetsIdSubmitEndpoint +from pyconnectwise.endpoints.manage.TimeSheetsIdApproveEndpoint import ( + TimeSheetsIdApproveEndpoint, +) +from pyconnectwise.endpoints.manage.TimeSheetsIdAuditsEndpoint import ( + TimeSheetsIdAuditsEndpoint, +) +from pyconnectwise.endpoints.manage.TimeSheetsIdRejectEndpoint import ( + TimeSheetsIdRejectEndpoint, +) +from pyconnectwise.endpoints.manage.TimeSheetsIdReverseEndpoint import ( + TimeSheetsIdReverseEndpoint, +) +from pyconnectwise.endpoints.manage.TimeSheetsIdSubmitEndpoint import ( + TimeSheetsIdSubmitEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimeSheet from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -15,13 +25,25 @@ class TimeSheetsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.approve = self._register_child_endpoint(TimeSheetsIdApproveEndpoint(client, parent_endpoint=self)) - self.audits = self._register_child_endpoint(TimeSheetsIdAuditsEndpoint(client, parent_endpoint=self)) - self.reject = self._register_child_endpoint(TimeSheetsIdRejectEndpoint(client, parent_endpoint=self)) - self.submit = self._register_child_endpoint(TimeSheetsIdSubmitEndpoint(client, parent_endpoint=self)) - self.reverse = self._register_child_endpoint(TimeSheetsIdReverseEndpoint(client, parent_endpoint=self)) + self.reject = self._register_child_endpoint( + TimeSheetsIdRejectEndpoint(client, parent_endpoint=self) + ) + self.submit = self._register_child_endpoint( + TimeSheetsIdSubmitEndpoint(client, parent_endpoint=self) + ) + self.approve = self._register_child_endpoint( + TimeSheetsIdApproveEndpoint(client, parent_endpoint=self) + ) + self.audits = self._register_child_endpoint( + TimeSheetsIdAuditsEndpoint(client, parent_endpoint=self) + ) + self.reverse = self._register_child_endpoint( + TimeSheetsIdReverseEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimeSheet]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimeSheet]: """ Performs a GET request against the /time/sheets/{id} endpoint and returns an initialized PaginatedResponse object. @@ -42,7 +64,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimeSheet: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimeSheet: """ Performs a GET request against the /time/sheets/{id} endpoint. @@ -52,9 +76,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimeSheet: The parsed response data. """ - return self._parse_one(TimeSheet, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimeSheet, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/sheets/{id} endpoint. @@ -64,4 +92,7 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsIdRejectEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsIdRejectEndpoint.py index fd6d20c61..264454402 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsIdRejectEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsIdRejectEndpoint.py @@ -10,7 +10,9 @@ class TimeSheetsIdRejectEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "reject", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /time/sheets/{id}/reject endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsIdReverseEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsIdReverseEndpoint.py index a80d0c6fd..f0e8770f8 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsIdReverseEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsIdReverseEndpoint.py @@ -10,7 +10,9 @@ class TimeSheetsIdReverseEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "reverse", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /time/sheets/{id}/reverse endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeSheetsIdSubmitEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeSheetsIdSubmitEndpoint.py index ac7f9716f..cc9491e7a 100644 --- a/src/pyconnectwise/endpoints/manage/TimeSheetsIdSubmitEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeSheetsIdSubmitEndpoint.py @@ -10,7 +10,9 @@ class TimeSheetsIdSubmitEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "submit", parent_endpoint=parent_endpoint) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> SuccessResponse: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> SuccessResponse: """ Performs a POST request against the /time/sheets/{id}/submit endpoint. @@ -20,4 +22,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: SuccessResponse: The parsed response data. """ - return self._parse_one(SuccessResponse, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + SuccessResponse, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesCountEndpoint.py index 34aa06915..a55aeaf7f 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesCountEndpoint.py @@ -10,7 +10,9 @@ class TimeTicketstopwatchesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/ticketstopwatches/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/ticketstopwatches/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesEndpoint.py index 40b5c3b6e..d9028041e 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeTicketstopwatchesCountEndpoint import TimeTicketstopwatchesCountEndpoint -from pyconnectwise.endpoints.manage.TimeTicketstopwatchesIdEndpoint import TimeTicketstopwatchesIdEndpoint +from pyconnectwise.endpoints.manage.TimeTicketstopwatchesCountEndpoint import ( + TimeTicketstopwatchesCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeTicketstopwatchesIdEndpoint import ( + TimeTicketstopwatchesIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TicketStopwatch from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class TimeTicketstopwatchesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "ticketstopwatches", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeTicketstopwatchesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeTicketstopwatchesCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeTicketstopwatchesIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TicketStopwatch]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TicketStopwatch]: """ Performs a GET request against the /time/ticketstopwatches endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TicketStopwatch]: The parsed response data. """ - return self._parse_many(TicketStopwatch, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TicketStopwatch, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketStopwatch: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketStopwatch: """ Performs a POST request against the /time/ticketstopwatches endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TicketStopwatch: The parsed response data. """ - return self._parse_one(TicketStopwatch, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TicketStopwatch, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesIdEndpoint.py index 479701c27..711dadb69 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTicketstopwatchesIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketStopwatch: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketStopwatch: """ Performs a GET request against the /time/ticketstopwatches/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TicketStopwatch: The parsed response data. """ - return self._parse_one(TicketStopwatch, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TicketStopwatch, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/ticketstopwatches/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketStopwatch: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketStopwatch: """ Performs a PUT request against the /time/ticketstopwatches/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TicketStopwatch: The parsed response data. """ - return self._parse_one(TicketStopwatch, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TicketStopwatch, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TicketStopwatch: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TicketStopwatch: """ Performs a PATCH request against the /time/ticketstopwatches/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TicketStopwatch: The parsed response data. """ - return self._parse_one(TicketStopwatch, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TicketStopwatch, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsCountEndpoint.py index 66c24a5e3..840e4bb92 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsCountEndpoint.py @@ -10,7 +10,9 @@ class TimeTimeperiodsetupsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/timePeriodSetups/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/timePeriodSetups/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsDefaultEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsDefaultEndpoint.py index d29d85f3a..72d9b7e88 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsDefaultEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsDefaultEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimePeriodSetupDefaults: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimePeriodSetupDefaults: """ Performs a GET request against the /time/timePeriodSetups/default endpoint. @@ -43,4 +45,7 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimePeriodSetupDefaults: The parsed response data. """ - return self._parse_one(TimePeriodSetupDefaults, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimePeriodSetupDefaults, + super()._make_request("GET", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsEndpoint.py index 40ae34d3e..db3dc5f77 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsCountEndpoint import TimeTimeperiodsetupsCountEndpoint -from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsDefaultEndpoint import TimeTimeperiodsetupsDefaultEndpoint -from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsIdEndpoint import TimeTimeperiodsetupsIdEndpoint +from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsCountEndpoint import ( + TimeTimeperiodsetupsCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsDefaultEndpoint import ( + TimeTimeperiodsetupsDefaultEndpoint, +) +from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsIdEndpoint import ( + TimeTimeperiodsetupsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimePeriodSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class TimeTimeperiodsetupsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "timePeriodSetups", parent_endpoint=parent_endpoint) - self.default = self._register_child_endpoint(TimeTimeperiodsetupsDefaultEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(TimeTimeperiodsetupsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeTimeperiodsetupsCountEndpoint(client, parent_endpoint=self) + ) + self.default = self._register_child_endpoint( + TimeTimeperiodsetupsDefaultEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeTimeperiodsetupsIdEndpoint: """ @@ -52,7 +62,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimePeriodSetup]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimePeriodSetup]: """ Performs a GET request against the /time/timePeriodSetups endpoint. @@ -62,9 +74,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimePeriodSetup]: The parsed response data. """ - return self._parse_many(TimePeriodSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimePeriodSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimePeriodSetup: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimePeriodSetup: """ Performs a POST request against the /time/timePeriodSetups endpoint. @@ -74,4 +91,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimePeriodSetup: The parsed response data. """ - return self._parse_one(TimePeriodSetup, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + TimePeriodSetup, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdEndpoint.py index 0f5895336..a98a64eca 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsIdPeriodsEndpoint import TimeTimeperiodsetupsIdPeriodsEndpoint +from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsIdPeriodsEndpoint import ( + TimeTimeperiodsetupsIdPeriodsEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimePeriodSetup from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -38,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimePeriodSetup: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimePeriodSetup: """ Performs a GET request against the /time/timePeriodSetups/{id} endpoint. @@ -48,9 +52,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimePeriodSetup: The parsed response data. """ - return self._parse_one(TimePeriodSetup, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimePeriodSetup, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/timePeriodSetups/{id} endpoint. @@ -60,9 +69,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimePeriodSetup: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimePeriodSetup: """ Performs a PUT request against the /time/timePeriodSetups/{id} endpoint. @@ -72,9 +86,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimePeriodSetup: The parsed response data. """ - return self._parse_one(TimePeriodSetup, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + TimePeriodSetup, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimePeriodSetup: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimePeriodSetup: """ Performs a PATCH request against the /time/timePeriodSetups/{id} endpoint. @@ -84,4 +103,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: TimePeriodSetup: The parsed response data. """ - return self._parse_one(TimePeriodSetup, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + TimePeriodSetup, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsCountEndpoint.py index 96ff2d999..a9885d426 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsCountEndpoint.py @@ -10,7 +10,9 @@ class TimeTimeperiodsetupsIdPeriodsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/timePeriodSetups/{id}/periods/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/timePeriodSetups/{id}/periods/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsEndpoint.py index e555eb6a9..862fdb416 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsEndpoint.py @@ -1,10 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsIdPeriodsCountEndpoint import \ - TimeTimeperiodsetupsIdPeriodsCountEndpoint -from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsIdPeriodsIdEndpoint import \ - TimeTimeperiodsetupsIdPeriodsIdEndpoint +from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsIdPeriodsCountEndpoint import ( + TimeTimeperiodsetupsIdPeriodsCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeTimeperiodsetupsIdPeriodsIdEndpoint import ( + TimeTimeperiodsetupsIdPeriodsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import TimePeriod from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -27,11 +29,15 @@ def id(self, id: int) -> TimeTimeperiodsetupsIdPeriodsIdEndpoint: Returns: TimeTimeperiodsetupsIdPeriodsIdEndpoint: The initialized TimeTimeperiodsetupsIdPeriodsIdEndpoint object. """ - child = TimeTimeperiodsetupsIdPeriodsIdEndpoint(self.client, parent_endpoint=self) + child = TimeTimeperiodsetupsIdPeriodsIdEndpoint( + self.client, parent_endpoint=self + ) child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimePeriod]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimePeriod]: """ Performs a GET request against the /time/timePeriodSetups/{id}/periods endpoint and returns an initialized PaginatedResponse object. @@ -52,7 +58,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[TimePeriod]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[TimePeriod]: """ Performs a GET request against the /time/timePeriodSetups/{id}/periods endpoint. @@ -62,4 +70,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[TimePeriod]: The parsed response data. """ - return self._parse_many(TimePeriod, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + TimePeriod, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsIdEndpoint.py index e27344b20..893f3a8ed 100644 --- a/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeTimePeriodSetupsIdPeriodsIdEndpoint.py @@ -10,7 +10,9 @@ class TimeTimeperiodsetupsIdPeriodsIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[TimePeriod]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[TimePeriod]: """ Performs a GET request against the /time/timePeriodSetups/{id}/periods/{id} endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> TimePeriod: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> TimePeriod: """ Performs a GET request against the /time/timePeriodSetups/{id}/periods/{id} endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> T Returns: TimePeriod: The parsed response data. """ - return self._parse_one(TimePeriod, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + TimePeriod, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesCountEndpoint.py index 5dd01d526..d66672fe0 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesCountEndpoint.py @@ -10,7 +10,9 @@ class TimeWorkrolesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/workRoles/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/workRoles/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesEndpoint.py index 5f363a263..88cfed376 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesCountEndpoint import TimeWorkrolesCountEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesIdEndpoint import TimeWorkrolesIdEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesInfoEndpoint import TimeWorkrolesInfoEndpoint +from pyconnectwise.endpoints.manage.TimeWorkrolesCountEndpoint import ( + TimeWorkrolesCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeWorkrolesIdEndpoint import ( + TimeWorkrolesIdEndpoint, +) +from pyconnectwise.endpoints.manage.TimeWorkrolesInfoEndpoint import ( + TimeWorkrolesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkRole from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class TimeWorkrolesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "workRoles", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(TimeWorkrolesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(TimeWorkrolesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeWorkrolesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + TimeWorkrolesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeWorkrolesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> TimeWorkrolesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[WorkRole]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[WorkRole]: """ Performs a GET request against the /time/workRoles endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkRole]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkRole]: """ Performs a GET request against the /time/workRoles endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkRole]: The parsed response data. """ - return self._parse_many(WorkRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkRole, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRole: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRole: """ Performs a POST request against the /time/workRoles endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkRole: The parsed response data. """ - return self._parse_one(WorkRole, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + WorkRole, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdEndpoint.py index e1a9d1153..7536c467a 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesIdInfoEndpoint import TimeWorkrolesIdInfoEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesIdLocationsEndpoint import TimeWorkrolesIdLocationsEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesIdUsagesEndpoint import TimeWorkrolesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.TimeWorkrolesIdInfoEndpoint import ( + TimeWorkrolesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.TimeWorkrolesIdLocationsEndpoint import ( + TimeWorkrolesIdLocationsEndpoint, +) +from pyconnectwise.endpoints.manage.TimeWorkrolesIdUsagesEndpoint import ( + TimeWorkrolesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkRole from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,11 +19,19 @@ class TimeWorkrolesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(TimeWorkrolesIdInfoEndpoint(client, parent_endpoint=self)) - self.locations = self._register_child_endpoint(TimeWorkrolesIdLocationsEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(TimeWorkrolesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + TimeWorkrolesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.locations = self._register_child_endpoint( + TimeWorkrolesIdLocationsEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + TimeWorkrolesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[WorkRole]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[WorkRole]: """ Performs a GET request against the /time/workRoles/{id} endpoint and returns an initialized PaginatedResponse object. @@ -38,7 +52,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRole: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRole: """ Performs a GET request against the /time/workRoles/{id} endpoint. @@ -48,9 +64,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkRole: The parsed response data. """ - return self._parse_one(WorkRole, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkRole, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/workRoles/{id} endpoint. @@ -60,9 +80,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRole: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRole: """ Performs a PUT request against the /time/workRoles/{id} endpoint. @@ -72,9 +97,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkRole: The parsed response data. """ - return self._parse_one(WorkRole, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + WorkRole, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRole: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRole: """ Performs a PATCH request against the /time/workRoles/{id} endpoint. @@ -84,4 +113,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkRole: The parsed response data. """ - return self._parse_one(WorkRole, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + WorkRole, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdInfoEndpoint.py index 7072b497a..fb45ff15e 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRoleInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRoleInfo: """ Performs a GET request against the /time/workRoles/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkRoleInfo: The parsed response data. """ - return self._parse_one(WorkRoleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkRoleInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsCountEndpoint.py index 8a1607adb..01f509381 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsCountEndpoint.py @@ -10,7 +10,9 @@ class TimeWorkrolesIdLocationsCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/workRoles/{id}/locations/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/workRoles/{id}/locations/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsEndpoint.py index d8038d978..92a68ca24 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesIdLocationsCountEndpoint import TimeWorkrolesIdLocationsCountEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesIdLocationsIdEndpoint import TimeWorkrolesIdLocationsIdEndpoint +from pyconnectwise.endpoints.manage.TimeWorkrolesIdLocationsCountEndpoint import ( + TimeWorkrolesIdLocationsCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeWorkrolesIdLocationsIdEndpoint import ( + TimeWorkrolesIdLocationsIdEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkRoleLocation from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,7 +16,9 @@ class TimeWorkrolesIdLocationsEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "locations", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeWorkrolesIdLocationsCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeWorkrolesIdLocationsCountEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeWorkrolesIdLocationsIdEndpoint: """ @@ -50,7 +56,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkRoleLocation]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkRoleLocation]: """ Performs a GET request against the /time/workRoles/{id}/locations endpoint. @@ -60,9 +68,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkRoleLocation]: The parsed response data. """ - return self._parse_many(WorkRoleLocation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkRoleLocation, + super()._make_request("GET", data=data, params=params).json(), + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRoleLocation: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRoleLocation: """ Performs a POST request against the /time/workRoles/{id}/locations endpoint. @@ -72,4 +85,7 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkRoleLocation: The parsed response data. """ - return self._parse_one(WorkRoleLocation, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + WorkRoleLocation, + super()._make_request("POST", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsIdEndpoint.py index cd49ee037..159706d81 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdLocationsIdEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRoleLocation: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRoleLocation: """ Performs a GET request against the /time/workRoles/{id}/locations/{id} endpoint. @@ -43,9 +45,14 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkRoleLocation: The parsed response data. """ - return self._parse_one(WorkRoleLocation, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkRoleLocation, + super()._make_request("GET", data=data, params=params).json(), + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/workRoles/{id}/locations/{id} endpoint. @@ -55,9 +62,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRoleLocation: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRoleLocation: """ Performs a PUT request against the /time/workRoles/{id}/locations/{id} endpoint. @@ -67,9 +79,14 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkRoleLocation: The parsed response data. """ - return self._parse_one(WorkRoleLocation, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + WorkRoleLocation, + super()._make_request("PUT", data=data, params=params).json(), + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkRoleLocation: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkRoleLocation: """ Performs a PATCH request against the /time/workRoles/{id}/locations/{id} endpoint. @@ -79,4 +96,7 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkRoleLocation: The parsed response data. """ - return self._parse_one(WorkRoleLocation, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + WorkRoleLocation, + super()._make_request("PATCH", data=data, params=params).json(), + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdUsagesEndpoint.py index 8b8d44210..951955ffd 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesIdUsagesListEndpoint import TimeWorkrolesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.TimeWorkrolesIdUsagesListEndpoint import ( + TimeWorkrolesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class TimeWorkrolesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(TimeWorkrolesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + TimeWorkrolesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /time/workRoles/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /time/workRoles/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdUsagesListEndpoint.py index 2f3ad88a4..af0b17d0f 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class TimeWorkrolesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /time/workRoles/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /time/workRoles/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesInfoCountEndpoint.py index 0c7747e9e..482a4ad2e 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class TimeWorkrolesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/workRoles/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/workRoles/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkRolesInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkRolesInfoEndpoint.py index c16a1a3c9..ebbfabba3 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkRolesInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkRolesInfoEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeWorkrolesInfoCountEndpoint import TimeWorkrolesInfoCountEndpoint +from pyconnectwise.endpoints.manage.TimeWorkrolesInfoCountEndpoint import ( + TimeWorkrolesInfoCountEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkRoleInfo from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,7 +13,9 @@ class TimeWorkrolesInfoEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "info", parent_endpoint=parent_endpoint) - self.count = self._register_child_endpoint(TimeWorkrolesInfoCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeWorkrolesInfoCountEndpoint(client, parent_endpoint=self) + ) def paginated( self, page: int, page_size: int, params: dict[str, int | str] = {} @@ -36,7 +40,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkRoleInfo]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkRoleInfo]: """ Performs a GET request against the /time/workRoles/info endpoint. @@ -46,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkRoleInfo]: The parsed response data. """ - return self._parse_many(WorkRoleInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkRoleInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkTypesCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkTypesCountEndpoint.py index 197760e70..bbb4e083f 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkTypesCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkTypesCountEndpoint.py @@ -10,7 +10,9 @@ class TimeWorktypesCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/workTypes/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/workTypes/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkTypesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkTypesEndpoint.py index 7f6e08082..2fbe27aa5 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkTypesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkTypesEndpoint.py @@ -1,9 +1,15 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeWorktypesCountEndpoint import TimeWorktypesCountEndpoint -from pyconnectwise.endpoints.manage.TimeWorktypesIdEndpoint import TimeWorktypesIdEndpoint -from pyconnectwise.endpoints.manage.TimeWorktypesInfoEndpoint import TimeWorktypesInfoEndpoint +from pyconnectwise.endpoints.manage.TimeWorktypesCountEndpoint import ( + TimeWorktypesCountEndpoint, +) +from pyconnectwise.endpoints.manage.TimeWorktypesIdEndpoint import ( + TimeWorktypesIdEndpoint, +) +from pyconnectwise.endpoints.manage.TimeWorktypesInfoEndpoint import ( + TimeWorktypesInfoEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -13,8 +19,12 @@ class TimeWorktypesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "workTypes", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(TimeWorktypesInfoEndpoint(client, parent_endpoint=self)) - self.count = self._register_child_endpoint(TimeWorktypesCountEndpoint(client, parent_endpoint=self)) + self.count = self._register_child_endpoint( + TimeWorktypesCountEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + TimeWorktypesInfoEndpoint(client, parent_endpoint=self) + ) def id(self, id: int) -> TimeWorktypesIdEndpoint: """ @@ -29,7 +39,9 @@ def id(self, id: int) -> TimeWorktypesIdEndpoint: child._id = id return child - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[WorkType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[WorkType]: """ Performs a GET request against the /time/workTypes endpoint and returns an initialized PaginatedResponse object. @@ -50,7 +62,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[WorkType]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[WorkType]: """ Performs a GET request against the /time/workTypes endpoint. @@ -60,9 +74,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[WorkType]: The parsed response data. """ - return self._parse_many(WorkType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + WorkType, super()._make_request("GET", data=data, params=params).json() + ) - def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkType: + def post( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkType: """ Performs a POST request against the /time/workTypes endpoint. @@ -72,4 +90,6 @@ def post(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkType: The parsed response data. """ - return self._parse_one(WorkType, super()._make_request("POST", data=data, params=params).json()) + return self._parse_one( + WorkType, super()._make_request("POST", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdEndpoint.py index c5f47bb4d..8ba1c6318 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdEndpoint.py @@ -1,8 +1,12 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeWorktypesIdInfoEndpoint import TimeWorktypesIdInfoEndpoint -from pyconnectwise.endpoints.manage.TimeWorktypesIdUsagesEndpoint import TimeWorktypesIdUsagesEndpoint +from pyconnectwise.endpoints.manage.TimeWorktypesIdInfoEndpoint import ( + TimeWorktypesIdInfoEndpoint, +) +from pyconnectwise.endpoints.manage.TimeWorktypesIdUsagesEndpoint import ( + TimeWorktypesIdUsagesEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import WorkType from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -12,10 +16,16 @@ class TimeWorktypesIdEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "{id}", parent_endpoint=parent_endpoint) - self.info = self._register_child_endpoint(TimeWorktypesIdInfoEndpoint(client, parent_endpoint=self)) - self.usages = self._register_child_endpoint(TimeWorktypesIdUsagesEndpoint(client, parent_endpoint=self)) + self.usages = self._register_child_endpoint( + TimeWorktypesIdUsagesEndpoint(client, parent_endpoint=self) + ) + self.info = self._register_child_endpoint( + TimeWorktypesIdInfoEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[WorkType]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[WorkType]: """ Performs a GET request against the /time/workTypes/{id} endpoint and returns an initialized PaginatedResponse object. @@ -36,7 +46,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkType: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkType: """ Performs a GET request against the /time/workTypes/{id} endpoint. @@ -46,9 +58,13 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkType: The parsed response data. """ - return self._parse_one(WorkType, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkType, super()._make_request("GET", data=data, params=params).json() + ) - def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> GenericMessageModel: + def delete( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> GenericMessageModel: """ Performs a DELETE request against the /time/workTypes/{id} endpoint. @@ -58,9 +74,14 @@ def delete(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) - Returns: GenericMessageModel: The parsed response data. """ - return self._parse_one(GenericMessageModel, super()._make_request("DELETE", data=data, params=params).json()) + return self._parse_one( + GenericMessageModel, + super()._make_request("DELETE", data=data, params=params).json(), + ) - def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkType: + def put( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkType: """ Performs a PUT request against the /time/workTypes/{id} endpoint. @@ -70,9 +91,13 @@ def put(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkType: The parsed response data. """ - return self._parse_one(WorkType, super()._make_request("PUT", data=data, params=params).json()) + return self._parse_one( + WorkType, super()._make_request("PUT", data=data, params=params).json() + ) - def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkType: + def patch( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkType: """ Performs a PATCH request against the /time/workTypes/{id} endpoint. @@ -82,4 +107,6 @@ def patch(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Returns: WorkType: The parsed response data. """ - return self._parse_one(WorkType, super()._make_request("PATCH", data=data, params=params).json()) + return self._parse_one( + WorkType, super()._make_request("PATCH", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdInfoEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdInfoEndpoint.py index f54509f43..22c4a81c4 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdInfoEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdInfoEndpoint.py @@ -33,7 +33,9 @@ def paginated( page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> WorkTypeInfo: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> WorkTypeInfo: """ Performs a GET request against the /time/workTypes/{id}/info endpoint. @@ -43,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> W Returns: WorkTypeInfo: The parsed response data. """ - return self._parse_one(WorkTypeInfo, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + WorkTypeInfo, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdUsagesEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdUsagesEndpoint.py index 008ebb752..622c00635 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdUsagesEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdUsagesEndpoint.py @@ -1,7 +1,9 @@ from typing import Any from pyconnectwise.endpoints.base.connectwise_endpoint import ConnectWiseEndpoint -from pyconnectwise.endpoints.manage.TimeWorktypesIdUsagesListEndpoint import TimeWorktypesIdUsagesListEndpoint +from pyconnectwise.endpoints.manage.TimeWorktypesIdUsagesListEndpoint import ( + TimeWorktypesIdUsagesListEndpoint, +) from pyconnectwise.models.base.message_model import GenericMessageModel from pyconnectwise.models.manage import Usage from pyconnectwise.responses.paginated_response import PaginatedResponse @@ -11,9 +13,13 @@ class TimeWorktypesIdUsagesEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "usages", parent_endpoint=parent_endpoint) - self.list = self._register_child_endpoint(TimeWorktypesIdUsagesListEndpoint(client, parent_endpoint=self)) + self.list = self._register_child_endpoint( + TimeWorktypesIdUsagesListEndpoint(client, parent_endpoint=self) + ) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /time/workTypes/{id}/usages endpoint and returns an initialized PaginatedResponse object. @@ -34,7 +40,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /time/workTypes/{id}/usages endpoint. @@ -44,4 +52,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdUsagesListEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdUsagesListEndpoint.py index 5121e7f22..8c44cde2e 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdUsagesListEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkTypesIdUsagesListEndpoint.py @@ -10,7 +10,9 @@ class TimeWorktypesIdUsagesListEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "list", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Usage]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Usage]: """ Performs a GET request against the /time/workTypes/{id}/usages/list endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> list[Usage]: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> list[Usage]: """ Performs a GET request against the /time/workTypes/{id}/usages/list endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> l Returns: list[Usage]: The parsed response data. """ - return self._parse_many(Usage, super()._make_request("GET", data=data, params=params).json()) + return self._parse_many( + Usage, super()._make_request("GET", data=data, params=params).json() + ) diff --git a/src/pyconnectwise/endpoints/manage/TimeWorkTypesInfoCountEndpoint.py b/src/pyconnectwise/endpoints/manage/TimeWorkTypesInfoCountEndpoint.py index 51d6fcee9..fcccdef67 100644 --- a/src/pyconnectwise/endpoints/manage/TimeWorkTypesInfoCountEndpoint.py +++ b/src/pyconnectwise/endpoints/manage/TimeWorkTypesInfoCountEndpoint.py @@ -10,7 +10,9 @@ class TimeWorktypesInfoCountEndpoint(ConnectWiseEndpoint): def __init__(self, client, parent_endpoint=None): super().__init__(client, "count", parent_endpoint=parent_endpoint) - def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {}) -> PaginatedResponse[Count]: + def paginated( + self, page: int, page_size: int, params: dict[str, int | str] = {} + ) -> PaginatedResponse[Count]: """ Performs a GET request against the /time/workTypes/info/count endpoint and returns an initialized PaginatedResponse object. @@ -31,7 +33,9 @@ def paginated(self, page: int, page_size: int, params: dict[str, int | str] = {} page_size, ) - def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> Count: + def get( + self, data: dict[str, Any] = {}, params: dict[str, int | str] = {} + ) -> Count: """ Performs a GET request against the /time/workTypes/info/count endpoint. @@ -41,4 +45,6 @@ def get(self, data: dict[str, Any] = {}, params: dict[str, int | str] = {}) -> C Returns: Count: The parsed response data. """ - return self._parse_one(Count, super()._make_request("GET", data=data, params=params).json()) + return self._parse_one( + Count, super()._make_request("GET", data=data, params=params).json() + )